cmake: update cmake_minimum_required to avoid deprecated warning
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
diff --git a/.github/cmake/CMakeLists.txt b/.github/cmake/CMakeLists.txt
index 39ebaf8..4875701 100644
--- a/.github/cmake/CMakeLists.txt
+++ b/.github/cmake/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.0...3.5)
project(ci_utils C CXX)
set(txt "CC=${CMAKE_C_COMPILER}
diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml
index 78fb73a..a70a3b6 100644
--- a/.github/workflows/msvc.yml
+++ b/.github/workflows/msvc.yml
@@ -34,7 +34,7 @@ jobs:
os.makedirs(builddir)
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
f.write(textwrap.dedent(f"""\
- cmake_minimum_required(VERSION 3.0)
+ cmake_minimum_required(VERSION 3.0...3.5)
project(sdl_user)
add_subdirectory("{ srcdir }" SDL)
"""))
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 00cf9b4..66b1cf7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3182,7 +3182,7 @@ if (SDL_ASAN)
endif()
if(SDL_CCACHE AND NOT CMAKE_VERSION VERSION_LESS 3.4)
- cmake_minimum_required(VERSION 3.4)
+ cmake_minimum_required(VERSION 3.4...3.5)
find_program(CCACHE_BINARY ccache)
if(CCACHE_BINARY)
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_BINARY})
diff --git a/VisualC/pkg-support/cmake/sdl2-config.cmake b/VisualC/pkg-support/cmake/sdl2-config.cmake
index 0f03a63..e54f470 100644
--- a/VisualC/pkg-support/cmake/sdl2-config.cmake
+++ b/VisualC/pkg-support/cmake/sdl2-config.cmake
@@ -1,7 +1,7 @@
# SDL2 CMake configuration file:
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.0...3.5)
include(FeatureSummary)
set_package_properties(SDL2 PROPERTIES
diff --git a/docs/README-cmake.md b/docs/README-cmake.md
index a86be33..cfd4066 100644
--- a/docs/README-cmake.md
+++ b/docs/README-cmake.md
@@ -48,7 +48,7 @@ SDL can be included in your project in 2 major ways:
The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
```cmake
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(mygame)
# Create an option to switch between a system sdl library and a vendored sdl library
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a7099e1..1f65b75 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.0...3.5)
project(SDL2_test)
include(CheckCCompilerFlag)