diff --git a/src/dawn/native/CMakeLists.txt b/src/dawn/native/CMakeLists.txt index 472a86d29f..42a2943e1a 100644 --- a/src/dawn/native/CMakeLists.txt +++ b/src/dawn/native/CMakeLists.txt @@ -963,7 +963,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() @@ -1065,7 +1064,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 c1ca58b3e2..e2b9faf26f 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -366,7 +366,7 @@ function(AddSubdirectoryDXC) endfunction() if (DAWN_USE_BUILT_DXC) - AddSubdirectoryDXC() + find_package(directx-dxc CONFIG REQUIRED GLOBAL) endif() if (TINT_BUILD_TINTD)