CMake changes for HLSL legalization

Cmake now looks for External/spirv-tools. If found, it links in
SPIRV-Tools-opt and SPVRemapper, and adds -DENABLE_OPT to build.
This commit is contained in:
GregF
2017-09-21 16:50:39 -06:00
parent 5f77d864f3
commit fd34f0e602
3 changed files with 30 additions and 1 deletions

View File

@@ -33,3 +33,10 @@ if(BUILD_TESTING)
"Google Mock was not found - tests based on that will not build")
endif()
endif()
if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt)
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools)
endif()
endif()