Skip to content

Commit d96d1ae

Browse files
committed
Merge branch 'master' into CameraSampler
2 parents 3e0135b + e07a9a7 commit d96d1ae

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,16 @@ set(VSG_MAX_INSTRUMENTATION_LEVEL 1 CACHE STRING "Set the instrumentation level
4343
# Enable/disable shader compilation support that pulls in glslang
4444
set(VSG_SUPPORTS_ShaderCompiler 1 CACHE STRING "Optional shader compiler support, 0 for off, 1 for enabled." )
4545
if (VSG_SUPPORTS_ShaderCompiler)
46-
set(GLSLANG_MIN_VERSION "14" CACHE STRING "glslang 14 is the earliest version that we think installs itself properly on all platforms. Other platforms may be able to use an earlier version")
47-
find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG)
46+
47+
# Try looking for glslang 15 first.
48+
set(GLSLANG_MIN_VERSION "15" CACHE STRING "glslang 14 is the earliest version that we think installs itself properly on all platforms. Other platforms may be able to use an earlier version")
49+
find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG QUIET)
50+
51+
if (NOT glslang_FOUND)
52+
# fallback to trying glslang 14.
53+
set(GLSLANG_MIN_VERSION "14")
54+
find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG)
55+
endif()
4856

4957
if (glslang_FOUND)
5058
set(FIND_DEPENDENCY_glslang "find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG REQUIRED)")

0 commit comments

Comments
 (0)