Skip to content

Commit

Permalink
cmake: bump CMake compatibility version to a relatively high 3.28
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Dec 6, 2024
1 parent 5b148e2 commit 7d4a40d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 18 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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:
Expand Down Expand Up @@ -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 `
Expand All @@ -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 `
Expand All @@ -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 `
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")

Expand Down Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion Xcode/pkg-support/resources/CMake/SDL3_imageConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmake/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 7d4a40d

Please sign in to comment.