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 $ $ - PRIVATE - $ - $ ) 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 #if VSG_SUPPORTS_ShaderCompiler -# include +# include # include # include #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")