@@ -37,53 +37,15 @@ set(SKIP_SPIRV_TOOLS_INSTALL ON CACHE INTERNAL "Skip SPIRV-Tools install")
37
37
set (SPIRV_SKIP_TESTS ON CACHE INTERNAL "Skip SPIRV-Tools tests" )
38
38
set (SPIRV_SKIP_EXECUTABLES ON CACHE INTERNAL "Skip SPIRV-Tools executable build" )
39
39
40
- add_subdirectory (dxc dxc )
41
-
42
- set (_NBL_DXC_TARGETS_WITH_FORCED_LOW_STANDARD_
43
- dxcompiler
44
- LLVMSupport
45
- llvm-tblgen
46
- clangCodeGen
47
- LLVMDxilDia
48
- LLVMAnalysis
49
- LLVMTransformUtils
50
- LLVMScalarOpts
51
- )
52
-
53
- foreach (_NBL_DXC_TARGET_WITH_FORCED_LOW_STANDARD_ IN LISTS _NBL_DXC_TARGETS_WITH_FORCED_LOW_STANDARD_ )
54
- set_property (TARGET ${_NBL_DXC_TARGET_WITH_FORCED_LOW_STANDARD_} PROPERTY CXX_STANDARD 11 )
55
- endforeach ()
56
-
40
+ set (CMAKE_CXX_STANDARD 11 )
41
+ if (NBL_DYNAMIC_MSVC_RUNTIME )
42
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" )
43
+ else ()
44
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
45
+ endif ()
57
46
58
- # TODO: change them
59
- #set(_DXC_CURRENT_CONFIG_ "$<IF:$<CONFIG:Debug>,Debug,Release>")
60
- #set(DXC_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dxc" CACHE INTERNAL "")
61
- #set(DXC_BINARY_DIR_EP "${CMAKE_CURRENT_BINARY_DIR}/external/dxc" CACHE INTERNAL "")
62
- #set(DXC_BINARY_DIR_GE "${DXC_BINARY_DIR_EP}/build" CACHE INTERNAL "")
63
- #set(DXC_BIN_DIR "${DXC_BINARY_DIR_GE}/Release/bin" CACHE INTERNAL "") # hardcoded
64
- #set(DXC_LIB_DIR "${DXC_BINARY_DIR_GE}/${_DXC_CURRENT_CONFIG_}/lib" CACHE INTERNAL "") # library path depends on the configuration
65
- #set(DXC_EXECUTABLE "${DXC_BIN_DIR}/dxc.exe" CACHE INTERNAL "")
66
- #set(DXC_DXCOMPILER_LIB "${DXC_LIB_DIR}/dxcompiler.lib" CACHE INTERNAL "")
67
-
68
- # DXC External Project
69
- # builds DXC executable target and dxcompiler library target
70
- # we cannot include it to Nabla's BS because DXC's BS isn't supposed to be added via submodule
71
- # - there are troubles with linker input paths and include/link search directory paths
72
-
73
- #ExternalProject_Add(dxc
74
- # DOWNLOAD_COMMAND ""
75
- # SOURCE_DIR "${DXC_SOURCE_DIR}"
76
- # BINARY_DIR "${DXC_BINARY_DIR_EP}"
77
- # BUILD_COMMAND "${CMAKE_COMMAND}" --build "${DXC_BINARY_DIR_GE}" --config Release --target dxc -v # DXC executable will be compiled always in Release mode
78
- # COMMAND "${CMAKE_COMMAND}" --build "${DXC_BINARY_DIR_GE}" --config ${_DXC_CURRENT_CONFIG_} --target dxcompiler -v
79
- # CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${DXC_SOURCE_DIR}" -B "${DXC_BINARY_DIR_GE}" -G "${CMAKE_GENERATOR}" "-Ax64" -T "${CMAKE_GENERATOR_TOOLSET}" ${DXC_CMAKE_ARGS}
80
- # INSTALL_COMMAND ""
81
- # TEST_COMMAND ""
82
- # LOG_INSTALL 1
83
- #)
84
-
85
- unset (DXC_CMAKE_ARGS )
86
- unset (_DXC_CURRENT_CONFIG_ )
47
+ add_subdirectory (dxc dxc )
48
+ set (CMAKE_CXX_STANDARD 20 ) # it's mandatory
87
49
88
50
#if(_NBL_ENABLE_DXC_COMPILE_TESTS_)
89
51
# add_subdirectory(CT CT)
0 commit comments