Skip to content

Commit

Permalink
(HIP-Basics/CMakeLists.txt): Add a dependency check on Glslang Validator
Browse files Browse the repository at this point in the history
Before CMake 2.24, "find_package(Vulkan COMPONENTS glslangValidator)"
would still return "Vulkan_FOUND" despite glslangValidator not being
present.
This change will fix a build failure on older CMake versions.
Note: apt-get on Ubuntu 22.40.x includes CMake 3.22.1.

Signed-off-by: David Galiffi <[email protected]>
  • Loading branch information
dgaliffiAMD committed May 21, 2024
1 parent 15488fe commit f904a88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HIP-Basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ if(NOT glfw3_FOUND)
message("GLFW not found, not building Vulkan interop example")
elseif(NOT Vulkan_FOUND)
message("Vulkan not found, not building Vulkan interop example")
elseif(NOT Vulkan_GLSLANG_VALIDATOR_EXECUTABLE)
message("GlslangValidator not found, not building Vulkan interop example")
else()
add_subdirectory(vulkan_interop)
endif()

0 comments on commit f904a88

Please sign in to comment.