d3d11: fix link errors

Bug: dawn:1724
Change-Id: If27342937e450d11a54f1d36f4378feb69d5e98e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130400
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
This commit is contained in:
Peng Huang 2023-04-29 00:57:59 +00:00 committed by Dawn LUCI CQ
parent e17f341487
commit 6ffec70123
2 changed files with 12 additions and 4 deletions

View File

@ -403,7 +403,6 @@ source_set("sources") {
"d3d/BackendD3D.h",
"d3d/BlobD3D.cpp",
"d3d/BlobD3D.h",
"d3d/D3DBackend.cpp",
"d3d/D3DCompilationRequest.h",
"d3d/D3DError.cpp",
"d3d/D3DError.h",
@ -443,7 +442,6 @@ source_set("sources") {
"d3d11/CommandRecordingContextD3D11.h",
"d3d11/ComputePipelineD3D11.cpp",
"d3d11/ComputePipelineD3D11.h",
"d3d11/D3D11Backend.cpp",
"d3d11/DeviceD3D11.cpp",
"d3d11/DeviceD3D11.h",
"d3d11/DeviceInfoD3D11.cpp",
@ -838,6 +836,12 @@ dawn_component("native") {
":vulkan_rpath",
]
if (dawn_enable_d3d11 || dawn_enable_d3d12) {
sources += [ "d3d/D3DBackend.cpp" ]
}
if (dawn_enable_d3d11) {
sources += [ "d3d11/D3D11Backend.cpp" ]
}
if (dawn_enable_d3d12) {
sources += [ "d3d12/D3D12Backend.cpp" ]
}

View File

@ -260,7 +260,6 @@ if (DAWN_ENABLE_D3D11 OR DAWN_ENABLE_D3D12)
"d3d/BackendD3D.h"
"d3d/BlobD3D.cpp"
"d3d/BlobD3D.h"
"d3d/D3DBackend.cpp"
"d3d/D3DCompilationRequest.h"
"d3d/D3DError.cpp"
"d3d/D3DError.h"
@ -300,7 +299,6 @@ if (DAWN_ENABLE_D3D11)
"d3d11/CommandRecordingContextD3D11.h"
"d3d11/ComputePipelineD3D11.cpp"
"d3d11/ComputePipelineD3D11.h"
"d3d11/D3D11Backend.cpp"
"d3d11/DeviceD3D11.cpp"
"d3d11/DeviceD3D11.h"
"d3d11/DeviceInfoD3D11.cpp"
@ -646,6 +644,12 @@ endif()
# TODO how to do the component build in CMake?
target_sources(dawn_native PRIVATE "DawnNative.cpp")
if (DAWN_ENABLE_D3D11 OR DAWN_ENABLE_D3D12)
target_sources(dawn_native PRIVATE "d3d/D3DBackend.cpp")
endif()
if (DAWN_ENABLE_D3D11)
target_sources(dawn_native PRIVATE "d3d11/D3D11Backend.cpp")
endif()
if (DAWN_ENABLE_D3D12)
target_sources(dawn_native PRIVATE "d3d12/D3D12Backend.cpp")
endif()