From 7d4a40d6387b5ce2a7fea7504adfa64c8ba9f9af Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 6 Dec 2024 23:02:57 +0100 Subject: [PATCH] cmake: bump CMake compatibility version to a relatively high 3.28 --- .github/workflows/release.yml | 10 ---------- CMakeLists.txt | 4 ++-- .../pkg-support/resources/CMake/SDL3_imageConfig.cmake | 2 +- .../share/cmake/SDL3_image/SDL3_imageConfig.cmake | 2 +- .../cmake/SDL3_image/SDL3_imageConfigVersion.cmake | 2 +- .../pkg-support/android/cmake/SDL3_imageConfig.cmake | 2 +- .../pkg-support/msvc/cmake/SDL3_imageConfig.cmake.in | 2 +- cmake/test/CMakeLists.txt | 2 +- 8 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c412bb4..755019e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -256,7 +256,6 @@ jobs: -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \ -DCMAKE_SYSTEM_NAME=Darwin \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ - -Werror=dev \ -B build_darwin cmake --build build_darwin --config Release --verbose @@ -268,7 +267,6 @@ jobs: -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \ -DCMAKE_SYSTEM_NAME=iOS \ -DCMAKE_OSX_ARCHITECTURES="arm64" \ - -Werror=dev \ -B build_ios cmake --build build_ios --config Release --verbose - name: 'CMake (configure + build) tvOS' @@ -279,7 +277,6 @@ jobs: -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \ -DCMAKE_SYSTEM_NAME=tvOS \ -DCMAKE_OSX_ARCHITECTURES="arm64" \ - -Werror=dev \ -B build_tvos cmake --build build_tvos --config Release --verbose - name: 'CMake (configure + build) iOS simulator' @@ -293,7 +290,6 @@ jobs: -DCMAKE_SYSTEM_NAME=iOS \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCMAKE_OSX_SYSROOT="${sysroot}" \ - -Werror=dev \ -B build_ios_simulator cmake --build build_ios_simulator --config Release --verbose - name: 'CMake (configure + build) tvOS simulator' @@ -307,7 +303,6 @@ jobs: -DCMAKE_SYSTEM_NAME=tvOS \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCMAKE_OSX_SYSROOT="${sysroot}" \ - -Werror=dev \ -B build_tvos_simulator cmake --build build_tvos_simulator --config Release --verbose msvc: @@ -428,7 +423,6 @@ jobs: -B build_x86 ` -GNinja ` -DCMAKE_BUILD_TYPE=Debug ` - -Werror=dev ` -DTEST_SHARED=TRUE ` -DTEST_STATIC=FALSE ` -DCMAKE_SUPPRESS_REGENERATION=TRUE ` @@ -445,7 +439,6 @@ jobs: -B build_x64 ` -GNinja ` -DCMAKE_BUILD_TYPE=Debug ` - -Werror=dev ` -DTEST_SHARED=TRUE ` -DTEST_STATIC=FALSE ` -DCMAKE_SUPPRESS_REGENERATION=TRUE ` @@ -462,7 +455,6 @@ jobs: -B build_arm64 ` -GNinja ` -DCMAKE_BUILD_TYPE=Debug ` - -Werror=dev ` -DTEST_SHARED=TRUE ` -DTEST_STATIC=FALSE ` -DCMAKE_SUPPRESS_REGENERATION=TRUE ` @@ -591,7 +583,6 @@ jobs: -DTEST_STATIC=FALSE \ -DCMAKE_PREFIX_PATH="/tmp/deps-mingw" \ -DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \ - -Werror=dev \ -B build_x86 cmake --build build_x86 --config Release --verbose - name: 'CMake (configure + build) x86_64' @@ -603,7 +594,6 @@ jobs: -DTEST_STATIC=FALSE \ -DCMAKE_PREFIX_PATH="/tmp/deps-mingw" \ -DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \ - -Werror=dev \ -B build_x64 cmake --build build_x64 --config Release --verbose diff --git a/CMakeLists.txt b/CMakeLists.txt index c933aff4..22407010 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.16...3.28) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") @@ -293,7 +293,7 @@ if(NOT ANDROID) VERSION "${SO_VERSION}" ) if(APPLE) - cmake_minimum_required(VERSION 3.17) + cmake_minimum_required(VERSION 3.17...3.28) set_target_properties(${sdl3_image_target_name} PROPERTIES MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPAT_VERSION}" MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}" diff --git a/Xcode/pkg-support/resources/CMake/SDL3_imageConfig.cmake b/Xcode/pkg-support/resources/CMake/SDL3_imageConfig.cmake index 16601673..4733aebf 100644 --- a/Xcode/pkg-support/resources/CMake/SDL3_imageConfig.cmake +++ b/Xcode/pkg-support/resources/CMake/SDL3_imageConfig.cmake @@ -2,7 +2,7 @@ # This file is meant to be placed in Resources/CMake of a SDL3_image framework # INTERFACE_LINK_OPTIONS needs CMake 3.12 -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.12...3.28) include(FeatureSummary) set_package_properties(SDL3_image PROPERTIES diff --git a/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfig.cmake b/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfig.cmake index c796676f..7aa1c461 100644 --- a/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfig.cmake +++ b/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfig.cmake @@ -2,7 +2,7 @@ # This file is meant to be placed in share/cmake/SDL3_image, next to SDL3_image.xcframework # INTERFACE_LINK_OPTIONS needs CMake 3.12 -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.12...3.28) include(FeatureSummary) set_package_properties(SDL3_image PROPERTIES diff --git a/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfigVersion.cmake b/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfigVersion.cmake index 4633a1bd..0619b133 100644 --- a/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfigVersion.cmake +++ b/Xcode/pkg-support/resources/share/cmake/SDL3_image/SDL3_imageConfigVersion.cmake @@ -3,7 +3,7 @@ # SDL CMake version configuration file: # This file is meant to be placed in share/cmake/SDL3_image, next to SDL3_image.xcframework -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.12...3.28) get_filename_component(_sdl3_image_xcframework_parent_path "${CMAKE_CURRENT_LIST_DIR}" REALPATH) # /share/cmake/SDL3_image/ get_filename_component(_sdl3_image_xcframework_parent_path "${_sdl3_image_xcframework_parent_path}" REALPATH) # /share/cmake/SDL3_image/ diff --git a/build-scripts/pkg-support/android/cmake/SDL3_imageConfig.cmake b/build-scripts/pkg-support/android/cmake/SDL3_imageConfig.cmake index 3ae22f42..7bac39dc 100644 --- a/build-scripts/pkg-support/android/cmake/SDL3_imageConfig.cmake +++ b/build-scripts/pkg-support/android/cmake/SDL3_imageConfig.cmake @@ -1,7 +1,7 @@ # SDL CMake configuration file: # This file is meant to be placed in lib/cmake/SDL3_image subfolder of a reconstructed Android SDL3_image SDK -cmake_minimum_required(VERSION 3.0...3.5) +cmake_minimum_required(VERSION 3.0...3.28) include(FeatureSummary) set_package_properties(SDL3_image PROPERTIES diff --git a/build-scripts/pkg-support/msvc/cmake/SDL3_imageConfig.cmake.in b/build-scripts/pkg-support/msvc/cmake/SDL3_imageConfig.cmake.in index 70be4ac6..d84fff28 100644 --- a/build-scripts/pkg-support/msvc/cmake/SDL3_imageConfig.cmake.in +++ b/build-scripts/pkg-support/msvc/cmake/SDL3_imageConfig.cmake.in @@ -7,7 +7,7 @@ set_package_properties(SDL3_image PROPERTIES DESCRIPTION "SDL_image is an image file loading library" ) -cmake_minimum_required(VERSION 3.0...3.5) +cmake_minimum_required(VERSION 3.0...3.28) # Copied from `configure_package_config_file` macro(check_required_components _NAME) diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index 61cad84c..276b5e10 100644 --- a/cmake/test/CMakeLists.txt +++ b/cmake/test/CMakeLists.txt @@ -1,6 +1,6 @@ # This cmake build script is meant for verifying the various CMake configuration script. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.12...3.28) project(sdl_test LANGUAGES C) cmake_policy(SET CMP0074 NEW)