diff --git a/CMakeLists.txt b/CMakeLists.txt index 61da709f..472bc6af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,9 +37,11 @@ find_package(Vulkan ${Vulkan_MIN_VERSION} REQUIRED) find_package(Threads REQUIRED) +find_package(glslang CONFIG REQUIRED) + # 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 4154312..7afcdd4 100644 --- a/src/vsg/CMakeLists.txt +++ b/src/vsg/CMakeLists.txt @@ -226,7 +226,7 @@ set(SOURCES utils/LoadPagedLOD.cpp ) -if (${VSG_SUPPORTS_ShaderCompiler}) +if (FALSE) # include glslang source code directly into the VulkanScenegraph library build. include(../glslang/build_vars.cmake) @@ -234,6 +234,14 @@ endif() # set up library dependencies set(LIBRARIES PUBLIC + glslang::glslang + glslang::OSDependent + glslang::MachineIndependent + glslang::GenericCodeGen + glslang::glslang-default-resource-limits + glslang::OGLCompiler + glslang::SPVRemapper + glslang::SPIRV Vulkan::Vulkan Threads::Threads ) @@ -364,9 +372,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 71a7f09f..803f26a1 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