Skip to content

Commit 2a5f5a3

Browse files
AnastaZIukdeprilula28
authored andcommitted
add DXC's include search directories for Nabla and its derivatives as generator expression reference, link dxcompiler target with all of its deps to Nabla with respect to NBL_STATIC_BUILD. TODO: resolve _ITERATOR_DEBUG_LEVEL linker mismatch
1 parent b1ca405 commit 2a5f5a3

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/nbl/CMakeLists.txt

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -585,20 +585,13 @@ if(_NBL_ENABLE_DXC_COMPILE_TESTS_)
585585
else()
586586
add_dependencies(Nabla dxcompiler)
587587
endif()
588-
target_include_directories(Nabla PRIVATE
589-
"${DXC_BINARY_DIR_GE}/tools/clang/tools/dxcompiler"
590-
"${DXC_SOURCE_DIR}/tools/clang/tools/dxcompiler"
591-
"${DXC_SOURCE_DIR}/tools/clang/include"
592-
"${DXC_BINARY_DIR_GE}/tools/clang/include"
593-
"${DXC_SOURCE_DIR}/include/llvm/llvm_assert"
594-
"${DXC_BINARY_DIR_GE}/include"
595-
"${DXC_SOURCE_DIR}/include"
596-
"${DXC_BINARY_DIR_GE}/include/dxc/Tracing"
597-
"${DXC_BINARY_DIR_GE}/utils/version"
598-
"${DXC_SOURCE_DIR}/external/SPIRV-Tools/include"
599-
"${DXC_SOURCE_DIR}/external/SPIRV-Headers/include"
600-
)
601-
target_link_libraries(Nabla INTERFACE "${DXC_DXCOMPILER_LIB}")
588+
589+
target_include_directories(Nabla PRIVATE $<TARGET_PROPERTY:dxcompiler,INCLUDE_DIRECTORIES>)
590+
if(NBL_STATIC_BUILD)
591+
target_link_libraries(Nabla INTERFACE dxcompiler)
592+
else()
593+
target_link_libraries(Nabla PRIVATE dxcompiler)
594+
endif()
602595

603596
# Linux Display Systems
604597
if (UNIX AND NOT ANDROID AND NOT APPLE)

0 commit comments

Comments
 (0)