mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-22 18:05:28 +00:00
externals: allow user to use system glslang (#7075)
This commit is contained in:
parent
e49b3c75bd
commit
2d83fff581
|
@ -103,6 +103,7 @@ option(USE_SYSTEM_XBYAK "Use the system xbyak (instead of the bundled one)" OFF)
|
|||
option(USE_SYSTEM_INIH "Use the system inih (instead of the bundled one)" OFF)
|
||||
option(USE_SYSTEM_FDK_AAC_HEADERS "Use the system fdk-aac headers (instead of the bundled one)" OFF)
|
||||
option(USE_SYSTEM_FFMPEG_HEADERS "Use the system FFmpeg headers (instead of the bundled one)" OFF)
|
||||
option(USE_SYSTEM_GLSLANG "Use the system glslang and SPIR-V libraries (instead of the bundled ones)" OFF)
|
||||
|
||||
if (CITRA_USE_PRECOMPILED_HEADERS)
|
||||
message(STATUS "Using Precompiled Headers.")
|
||||
|
|
25
externals/CMakeLists.txt
vendored
25
externals/CMakeLists.txt
vendored
|
@ -117,13 +117,24 @@ endif()
|
|||
add_subdirectory(glad)
|
||||
|
||||
# glslang
|
||||
set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "")
|
||||
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "")
|
||||
set(ENABLE_SPVREMAPPER OFF CACHE BOOL "")
|
||||
set(ENABLE_CTEST OFF CACHE BOOL "")
|
||||
set(ENABLE_HLSL OFF CACHE BOOL "")
|
||||
set(BUILD_EXTERNAL OFF CACHE BOOL "")
|
||||
add_subdirectory(glslang)
|
||||
if(USE_SYSTEM_GLSLANG)
|
||||
find_package(glslang REQUIRED)
|
||||
add_library(glslang INTERFACE)
|
||||
add_library(SPIRV INTERFACE)
|
||||
target_link_libraries(glslang INTERFACE glslang::glslang)
|
||||
target_link_libraries(SPIRV INTERFACE glslang::SPIRV)
|
||||
# System include path is different from submodule include path
|
||||
get_target_property(GLSLANG_PREFIX glslang::SPIRV INTERFACE_INCLUDE_DIRECTORIES)
|
||||
target_include_directories(SPIRV SYSTEM INTERFACE "${GLSLANG_PREFIX}/glslang")
|
||||
else()
|
||||
set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "")
|
||||
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "")
|
||||
set(ENABLE_SPVREMAPPER OFF CACHE BOOL "")
|
||||
set(ENABLE_CTEST OFF CACHE BOOL "")
|
||||
set(ENABLE_HLSL OFF CACHE BOOL "")
|
||||
set(BUILD_EXTERNAL OFF CACHE BOOL "")
|
||||
add_subdirectory(glslang)
|
||||
endif()
|
||||
|
||||
# inih
|
||||
if(USE_SYSTEM_INIH)
|
||||
|
|
Loading…
Reference in a new issue