mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-23 11:19:40 +00:00
Look for external SPIR-V Tools build, if not building in-tree
This allows to build with optimizer enabled, if external SPIR-V tools libraries are available in the system. It is quite common in *nix world to package spirv-tools and glslang separately. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
parent
0da98c51c4
commit
99da060110
@ -264,8 +264,15 @@ if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
|
||||
add_subdirectory(External)
|
||||
endif()
|
||||
|
||||
option(ALLOW_EXTERNAL_SPIRV_TOOLS "Allows to build against installed SPIRV-Tools-opt" OFF)
|
||||
if(NOT TARGET SPIRV-Tools-opt)
|
||||
set(ENABLE_OPT OFF)
|
||||
if(ALLOW_EXTERNAL_SPIRV_TOOLS)
|
||||
# Look for external SPIR-V Tools build, if not building in-tree
|
||||
find_package(SPIRV-Tools-opt)
|
||||
endif()
|
||||
if(NOT TARGET SPIRV-Tools-opt)
|
||||
set(ENABLE_OPT OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPT)
|
||||
|
Loading…
Reference in New Issue
Block a user