From c59904062ff2092a8b7f6fb84815a261b6a429d5 Mon Sep 17 00:00:00 2001 From: Eli2 Date: Mon, 17 Jul 2023 21:19:08 +0200 Subject: [PATCH] Bump required CMake version to 3.16 --- CMakeLists.txt | 23 ++--------------------- extern/CMakeLists.txt | 5 ----- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a559e1cba..f992220761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,26 +1,7 @@ -cmake_minimum_required(VERSION 3.1.0) - -# for link time optimization, remove if cmake version is >= 3.9 -if(POLICY CMP0069) # LTO - cmake_policy(SET CMP0069 NEW) -endif() - -# for position-independent executable, remove if cmake version is >= 3.14 -if(POLICY CMP0083) - cmake_policy(SET CMP0083 NEW) -endif() - -# to link with freetype library -if(POLICY CMP0079) - cmake_policy(SET CMP0079 NEW) -endif() - -# don't add /W3 flag by default for MSVC -if(POLICY CMP0092) - cmake_policy(SET CMP0092 NEW) -endif() +cmake_minimum_required(VERSION 3.16.0) # set the timestamps of extracted contents to the time of extraction +# remove if cmake version is >= 3.24 if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 33908c8caf..800a980c0e 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -18,7 +18,6 @@ macro(FetchContent_MakeAvailableExcludeFromAll) endmacro() if(NOT OPENMW_USE_SYSTEM_BULLET) - cmake_minimum_required(VERSION 3.11) # for FetchContent set(BUILD_BULLET3 OFF CACHE BOOL "") set(BUILD_EXTRAS OFF CACHE BOOL "") @@ -63,7 +62,6 @@ if(NOT OPENMW_USE_SYSTEM_BULLET) endif() if(NOT OPENMW_USE_SYSTEM_MYGUI) - cmake_minimum_required(VERSION 3.11) # for FetchContent set(MYGUI_RENDERSYSTEM 4 CACHE STRING "") set(MYGUI_DISABLE_PLUGINS TRUE CACHE BOOL "") @@ -95,7 +93,6 @@ if(NOT OPENMW_USE_SYSTEM_MYGUI) endif() if(NOT OPENMW_USE_SYSTEM_OSG) - cmake_minimum_required(VERSION 3.11) # for FetchContent set(BUILD_OSG_APPLICATIONS OFF CACHE BOOL "") set(BUILD_OSG_DEPRECATED_SERIALIZERS OFF CACHE BOOL "") @@ -213,7 +210,6 @@ endif() add_subdirectory(smhasher) if (BUILD_BENCHMARKS AND NOT OPENMW_USE_SYSTEM_BENCHMARK) - cmake_minimum_required(VERSION 3.11) set(BENCHMARK_ENABLE_TESTING OFF) set(BENCHMARK_ENABLE_INSTALL OFF) @@ -304,7 +300,6 @@ if (NOT OPENMW_USE_SYSTEM_ICU) endif() if ((BUILD_UNITTESTS OR BUILD_OPENCS_TESTS) AND NOT OPENMW_USE_SYSTEM_GOOGLETEST) - cmake_minimum_required(VERSION 3.11) include(FetchContent) FetchContent_Declare(googletest