Tests/FindVulkan: Update for glslang 12.3+ output

Since 12.3.0 glslangValidator has been renamed to glslang.

This fix maintains backcompat with older SDKs
This commit is contained in:
Juan Ramos
2024-02-06 20:18:21 -07:00
committed by Brad King
parent 28fc87e120
commit b832767940

View File

@@ -11,8 +11,10 @@ function(run_glslangValidator exe exe_display)
message(SEND_ERROR "Result of ${exe_display} --help is ${result}, should be 1")
endif()
if(NOT output MATCHES "^Usage: glslangValidator")
message(SEND_ERROR "Output of ${exe_display} --help is \"${output}\", should begin with \"Usage: glslangValidator\"")
# NOTE: Newer version prefer just "glslang" since it's no longer really just a validator.
# This approach is still compatible with older version that output glslangValidator
if(NOT output MATCHES "^Usage: glslang")
message(SEND_ERROR "Output of ${exe_display} --help is \"${output}\", should begin with \"Usage: glslang\"")
endif()
endfunction()