Skip to content

Commit

Permalink
Add minimum required Vulkan version check in the CMake module example
Browse files Browse the repository at this point in the history
Add minimum required Vulkan version check in the CMake module example
  • Loading branch information
sharadhr committed Jan 7, 2024
1 parent d38fcd6 commit 53e3315
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,13 @@ CMake provides the [FindVulkan module](https://cmake.org/cmake/help/latest/modul
# find Vulkan SDK
find_package( Vulkan REQUIRED )
# Require Vulkan version ≥ 1.3.256 (earliest version when the Vulkan module was available)
if( ${Vulkan_VERSION} VERSION_LESS "1.3.256" )
message( FATAL_ERROR "Minimum required Vulkan version for C++ modules is 1.3.256. "
"Found ${Vulkan_VERSION}."
)
endif()
# set up Vulkan C++ module as a library
add_library( VulkanHppModule )
target_sources( VulkanHppModule PRIVATE
Expand Down

0 comments on commit 53e3315

Please sign in to comment.