cmake: Update minimum version to 3.22.1

Matches Vulkan Validation Layers and SPIRV-Tools.
This commit is contained in:
Juan Ramos 2025-02-01 10:55:49 -07:00 committed by Charles Giessen
parent 39f924b810
commit 234c4b7370
3 changed files with 4 additions and 9 deletions

View file

@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ~~~
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.22.1)
# NOTE: Parsing the version like this is suboptimal but neccessary due to our release process:
# https://github.com/KhronosGroup/Vulkan-Headers/pull/346
@ -72,11 +72,6 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.28" AND VULKAN_HEADERS_ENABLE_MODULE
target_link_libraries(Vulkan-Module PUBLIC Vulkan-Headers)
endif ()
if (CMAKE_VERSION VERSION_LESS "3.21")
# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html
string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL)
endif()
option(VULKAN_HEADERS_ENABLE_TESTS "Test Vulkan-Headers" ${PROJECT_IS_TOP_LEVEL})
option(VULKAN_HEADERS_ENABLE_INSTALL "Install Vulkan-Headers" ${PROJECT_IS_TOP_LEVEL})