From 771daa743c98a63b7ac1f96c38bc59e73edd9813 Mon Sep 17 00:00:00 2001 From: docentYT <63965954+docentYT@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:45:35 +0100 Subject: [PATCH] Fix DXIL IMPORTED_LOCATION path --- betterRenderer/mashadercompiler/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/betterRenderer/mashadercompiler/CMakeLists.txt b/betterRenderer/mashadercompiler/CMakeLists.txt index 31529195..809986ef 100644 --- a/betterRenderer/mashadercompiler/CMakeLists.txt +++ b/betterRenderer/mashadercompiler/CMakeLists.txt @@ -20,6 +20,14 @@ if (WIN32) endif () # We later pass the DXIL.dll parent directory as first argument to MaSzynaShaderCompiler so that it can sign DX12 shaders -get_target_property(dxil_dll_path Microsoft::DXIL IMPORTED_LOCATION) +get_target_property(dxil_dll_path Microsoft::DXIL IMPORTED_LOCATION_RELEASE) +if(NOT dxil_dll_path) + get_target_property(dxil_dll_path Microsoft::DXIL IMPORTED_LOCATION_DEBUG) +endif() + +if(NOT dxil_dll_path) + message(FATAL_ERROR "DXIL.dll not found") +endif() + get_filename_component(dxil_dll_path ${dxil_dll_path} DIRECTORY) -set_target_properties(MaSzynaShaderCompiler PROPERTIES dxil_path "${dxil_dll_path}") +set_target_properties(MaSzynaShaderCompiler PROPERTIES dxil_path "${dxil_dll_path}") \ No newline at end of file