mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-19 00:30:25 +08:00
d0897bed3b
- [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
80 lines
2.7 KiB
Diff
80 lines
2.7 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 85d18322..0ad18049 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -36,13 +36,14 @@ endif()
|
|
find_package(Vulkan ${Vulkan_MIN_VERSION} REQUIRED)
|
|
|
|
find_package(Threads REQUIRED)
|
|
+find_package(glslang CONFIG REQUIRED)
|
|
|
|
# Set the instrumentation level to compile into sources
|
|
set(VSG_MAX_INSTRUMENTATION_LEVEL 1 CACHE STRING "Set the instrumentation level to build into the VSG ibrary, 0 for off, 1 coarse grained, 2 medium, 3 fine grained." )
|
|
|
|
# Enable/disable shader compilation support that pulls in glslang
|
|
set(VSG_SUPPORTS_ShaderCompiler 1 CACHE STRING "Optional shader compiler support, 0 for off, 1 for enabled." )
|
|
-if (VSG_SUPPORTS_ShaderCompiler)
|
|
+if (FALSE)
|
|
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/build_vars.cmake)
|
|
|
|
if (Git_FOUND)
|
|
diff --git a/src/vsg/CMakeLists.txt b/src/vsg/CMakeLists.txt
|
|
index 36597e0f..9f8cd47e 100644
|
|
--- a/src/vsg/CMakeLists.txt
|
|
+++ b/src/vsg/CMakeLists.txt
|
|
@@ -254,7 +254,7 @@ set(SOURCES
|
|
utils/Profiler.cpp
|
|
)
|
|
|
|
-if (${VSG_SUPPORTS_ShaderCompiler})
|
|
+if (FALSE)
|
|
|
|
# include glslang source code directly into the VulkanScenegraph library build.
|
|
include(../glslang/build_vars.cmake)
|
|
@@ -264,6 +264,10 @@ endif()
|
|
set(LIBRARIES PUBLIC
|
|
Vulkan::Vulkan
|
|
Threads::Threads
|
|
+ PRIVATE
|
|
+ glslang::glslang
|
|
+ glslang::glslang-default-resource-limits
|
|
+ glslang::SPIRV
|
|
)
|
|
|
|
# Check for std::atomic
|
|
@@ -402,9 +406,6 @@ target_include_directories(vsg
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${VSG_SOURCE_DIR}/include>
|
|
$<BUILD_INTERFACE:${VSG_BINARY_DIR}/include>
|
|
- PRIVATE
|
|
- $<BUILD_INTERFACE:${VSG_SOURCE_DIR}/src/glslang>
|
|
- $<BUILD_INTERFACE:${GLSLANG_GENERATED_INCLUDEDIR}>
|
|
)
|
|
|
|
target_link_libraries(vsg ${LIBRARIES})
|
|
diff --git a/src/vsg/utils/ShaderCompiler.cpp b/src/vsg/utils/ShaderCompiler.cpp
|
|
index a8f8dec9..2ca86f87 100644
|
|
--- a/src/vsg/utils/ShaderCompiler.cpp
|
|
+++ b/src/vsg/utils/ShaderCompiler.cpp
|
|
@@ -20,7 +20,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
#include <vsg/utils/ShaderCompiler.h>
|
|
|
|
#if VSG_SUPPORTS_ShaderCompiler
|
|
-# include <SPIRV/GlslangToSpv.h>
|
|
+# include <glslang/SPIRV/GlslangToSpv.h>
|
|
# include <glslang/Public/ResourceLimits.h>
|
|
# include <glslang/Public/ShaderLang.h>
|
|
#endif
|
|
diff --git a/src/vsg/vsgConfig.cmake.in b/src/vsg/vsgConfig.cmake.in
|
|
index 7ea0de02..4f7e77bd 100644
|
|
--- a/src/vsg/vsgConfig.cmake.in
|
|
+++ b/src/vsg/vsgConfig.cmake.in
|
|
@@ -2,6 +2,7 @@ include(CMakeFindDependencyMacro)
|
|
|
|
find_package(Vulkan @Vulkan_MIN_VERSION@ REQUIRED)
|
|
find_dependency(Threads)
|
|
+find_dependency(glslang)
|
|
|
|
@FIND_DEPENDENCY_WINDOWING@
|
|
include("${CMAKE_CURRENT_LIST_DIR}/vsgTargets.cmake")
|