cmake: allow system glslang library
This commit is contained in:
parent
c7ee42f0ba
commit
40cdef6c1c
|
@ -55,6 +55,7 @@ option(ENABLE_LOG "Enable full logging" OFF)
|
|||
option(ASAN "Enable address sanitizer" OFF)
|
||||
option(USE_GLES "Use GLES[3] API" OFF)
|
||||
option(USE_GLES2 "Use GLES2 API" OFF)
|
||||
option(USE_HOST_GLSLANG "Use host glslang" OFF)
|
||||
option(USE_HOST_LIBZIP "Use host libzip" ON)
|
||||
option(USE_HOST_SDL "Use host SDL library" ${USE_HOST_SDL_DEFAULT})
|
||||
option(USE_OPENMP "Use OpenMP if available" ON)
|
||||
|
@ -383,14 +384,20 @@ add_subdirectory(core/deps/glm)
|
|||
target_link_libraries(${PROJECT_NAME} PRIVATE glm::glm)
|
||||
|
||||
if(USE_VULKAN)
|
||||
option(BUILD_EXTERNAL "Build external dependencies in /External" OFF)
|
||||
option(SKIP_GLSLANG_INSTALL "Skip installation" ON)
|
||||
option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" OFF)
|
||||
option(ENABLE_GLSLANG_BINARIES "Builds glslang and spirv-remap" OFF)
|
||||
option(ENABLE_HLSL "Enables HLSL input support" OFF)
|
||||
option(ENABLE_PCH "Enables Precompiled header" OFF)
|
||||
add_subdirectory(core/deps/glslang EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE glslang-default-resource-limits SPIRV)
|
||||
if(USE_HOST_GLSLANG)
|
||||
find_package(glslang REQUIRED)
|
||||
else()
|
||||
option(BUILD_EXTERNAL "Build external dependencies in /External" OFF)
|
||||
option(SKIP_GLSLANG_INSTALL "Skip installation" ON)
|
||||
option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" OFF)
|
||||
option(ENABLE_GLSLANG_BINARIES "Builds glslang and spirv-remap" OFF)
|
||||
option(ENABLE_HLSL "Enables HLSL input support" OFF)
|
||||
option(ENABLE_PCH "Enables Precompiled header" OFF)
|
||||
add_subdirectory(core/deps/glslang EXCLUDE_FROM_ALL)
|
||||
add_library(glslang::glslang-default-resource-limits ALIAS glslang-default-resource-limits)
|
||||
add_library(glslang::SPIRV ALIAS SPIRV)
|
||||
endif()
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE glslang::glslang-default-resource-limits glslang::SPIRV)
|
||||
endif()
|
||||
|
||||
if(NOT LIBRETRO)
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
#include "vulkan_context.h"
|
||||
|
||||
#include <glslang/Public/ResourceLimits.h>
|
||||
#include <SPIRV/GlslangToSpv.h>
|
||||
#include <glslang/Public/ShaderLang.h>
|
||||
#include <glslang/SPIRV/GlslangToSpv.h>
|
||||
|
||||
int ShaderCompiler::initCount;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include "vulkan.h"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include <glslang/SPIRV/GlslangToSpv.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <map>
|
||||
|
|
Loading…
Reference in New Issue