External: Updated DirectXShaderCompiler
This commit is contained in:
Родитель
3d82ecf591
Коммит
cfe64907a5
|
@ -62,8 +62,6 @@ if(SC_CLANGFORMAT)
|
|||
return()
|
||||
endif()
|
||||
|
||||
# DirectXShaderCompiler requires it
|
||||
add_definitions(-D_ITERATOR_DEBUG_LEVEL=0)
|
||||
# Handle a compiling issue of SPIR-V
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
set(DirectXShaderCompiler_REV "002ed9737e389cebbefd1e8376bff6ad8a642340")
|
||||
set(DirectXShaderCompiler_REV "a5365731f0e1ce961fd1f155eb25ff3343ed5e2b")
|
||||
|
||||
UpdateExternalLib("DirectXShaderCompiler" "https://github.com/Microsoft/DirectXShaderCompiler.git" ${DirectXShaderCompiler_REV})
|
||||
|
||||
|
@ -13,6 +13,7 @@ set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
|
|||
set(HLSL_INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(HLSL_BUILD_DXILCONV OFF CACHE BOOL "" FORCE)
|
||||
set(HLSL_SUPPORT_QUERY_GIT_COMMIT_INFO OFF CACHE BOOL "" FORCE)
|
||||
set(HLSL_ENABLE_DEBUG_ITERATORS ON CACHE BOOL "" FORCE)
|
||||
set(LLVM_TARGETS_TO_BUILD "None" CACHE STRING "" FORCE)
|
||||
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "" FORCE)
|
||||
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
|
|
|
@ -6,7 +6,6 @@ set(SPIRV_Tools_REV "fd773eb50d628c1981338addc093df879757c2cf")
|
|||
UpdateExternalLib("SPIRV-Tools" "https://github.com/KhronosGroup/SPIRV-Tools.git" ${SPIRV_Tools_REV})
|
||||
|
||||
set(SPIRV_SKIP_EXECUTABLES ON CACHE BOOL "" FORCE)
|
||||
set(SPIRV_TOOLS_EXTRA_DEFINITIONS /D_ITERATOR_DEBUG_LEVEL=0)
|
||||
add_subdirectory(SPIRV-Tools EXCLUDE_FROM_ALL)
|
||||
foreach(target
|
||||
"core_tables" "enum_string_mapping" "extinst_tables"
|
||||
|
|
|
@ -50,14 +50,10 @@ target_include_directories(${LIB_NAME}
|
|||
PRIVATE
|
||||
${SC_BUILD_DIR}/External/DirectXShaderCompiler/include
|
||||
${SC_ROOT_DIR}/External/DirectXShaderCompiler/include
|
||||
$<TARGET_PROPERTY:spirv-cross-core,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
target_compile_definitions(${LIB_NAME}
|
||||
PRIVATE
|
||||
-DSHADER_CONDUCTOR_SOURCE
|
||||
-DDBG
|
||||
-DSUPPORT_QUERY_GIT_COMMIT_INFO
|
||||
-DENABLE_SPIRV_CODEGEN
|
||||
)
|
||||
if(MSVC)
|
||||
target_compile_definitions(${LIB_NAME}
|
||||
|
@ -69,10 +65,8 @@ if(MSVC)
|
|||
)
|
||||
endif()
|
||||
target_link_libraries(${LIB_NAME}
|
||||
PUBLIC
|
||||
dxcompiler
|
||||
|
||||
PRIVATE
|
||||
dxcompiler
|
||||
LLVMDxcSupport
|
||||
LLVMSupport
|
||||
spirv-cross-core
|
||||
|
|
|
@ -44,11 +44,6 @@ source_group("Data Files\\Input\\Inc" FILES ${DATA_INC_FILES})
|
|||
|
||||
add_executable(${EXE_NAME} ${SOURCE_FILES} ${DATA_FILES} ${DATA_INC_FILES})
|
||||
|
||||
target_include_directories(${EXE_NAME}
|
||||
PRIVATE
|
||||
$<TARGET_PROPERTY:ShaderConductor,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
$<TARGET_PROPERTY:gtest,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
target_compile_definitions(${EXE_NAME}
|
||||
PRIVATE
|
||||
-DTEST_DATA_DIR="${SC_ROOT_DIR}/Source/Tests/Data/"
|
||||
|
|
|
@ -11,14 +11,10 @@ source_group("Source Files" FILES ${SOURCE_FILES})
|
|||
|
||||
add_executable(${EXE_NAME} ${SOURCE_FILES})
|
||||
|
||||
target_include_directories(${EXE_NAME}
|
||||
PRIVATE
|
||||
$<TARGET_PROPERTY:ShaderConductor,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
$<TARGET_PROPERTY:cxxopts,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
target_link_libraries(${EXE_NAME}
|
||||
PRIVATE
|
||||
ShaderConductor
|
||||
cxxopts
|
||||
)
|
||||
|
||||
add_dependencies(${EXE_NAME} ShaderConductor)
|
||||
|
|
|
@ -12,11 +12,6 @@ source_group("Source Files" FILES ${SOURCE_FILES})
|
|||
|
||||
add_library(${DLL_NAME} SHARED ${SOURCE_FILES})
|
||||
|
||||
target_include_directories(${DLL_NAME}
|
||||
PRIVATE
|
||||
$<TARGET_PROPERTY:ShaderConductor,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
||||
target_link_libraries(${DLL_NAME}
|
||||
PRIVATE
|
||||
ShaderConductor
|
||||
|
|
Загрузка…
Ссылка в новой задаче