diff --git a/src/dawn/native/CMakeLists.txt b/src/dawn/native/CMakeLists.txt index ca48521325..5c5de6dadb 100644 --- a/src/dawn/native/CMakeLists.txt +++ b/src/dawn/native/CMakeLists.txt @@ -976,7 +976,6 @@ if (DAWN_ENABLE_D3D12) if (DAWN_USE_BUILT_DXC) target_compile_definitions(dawn_native PRIVATE "DAWN_USE_BUILT_DXC") target_compile_definitions(dawn_native_objects PRIVATE "DAWN_USE_BUILT_DXC") - add_dependencies(dawn_native copy_dxil_dll) endif() endif() @@ -1078,7 +1077,7 @@ endif () # They happen because dxcompiler is declared a shared library and bundle_libraries # doesn't work well with shared libs if (DAWN_USE_BUILT_DXC) - target_link_libraries(dawn_native PRIVATE dxcompiler) + target_link_libraries(dawn_native PRIVATE Microsoft::DirectXShaderCompiler) endif() # Copy d3dcompiler_47.dll from Windows SDK when not using system component loading diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 78cc35d582..e8d6cfdf48 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -371,7 +371,7 @@ function(AddSubdirectoryDXC) endfunction() if (DAWN_USE_BUILT_DXC) - AddSubdirectoryDXC() + find_package(directx-dxc CONFIG REQUIRED GLOBAL) endif() if (TINT_BUILD_TINTD)