mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Bump minimum CMake version from 2.8 to 2.8.12
Declare that we're fine with policies up to 3.19.1. This should fix policy errors and "too low cmake_minimal_version() errors" for the forseeable future.
This commit is contained in:
parent
490a436ee6
commit
59cbc01415
|
@ -1,4 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 2.8.12...3.19.1)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
cmake_policy(VERSION ${CMAKE_VERSION})
|
||||
endif()
|
||||
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9 CACHE INTERNAL "")
|
||||
if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9)
|
||||
|
@ -22,23 +25,8 @@ else()
|
|||
message(FATAL_ERROR "Couldn't parse version from src/game/version.h")
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0017)
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
if(VERSION_PATCH STREQUAL "0")
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||
else()
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
endif()
|
||||
else()
|
||||
project(DDNet)
|
||||
# Extra support for CMake pre-3.0
|
||||
if(NOT POLICY CMP0048)
|
||||
set(PROJECT_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
set(PROJECT_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(PROJECT_VERSION_PATCH ${VERSION_PATCH})
|
||||
|
@ -48,6 +36,11 @@ else()
|
|||
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
endif()
|
||||
endif()
|
||||
if(VERSION_PATCH STREQUAL "0")
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||
else()
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
endif()
|
||||
|
||||
set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
set(ORIGINAL_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 2.8.12...3.19.1)
|
||||
|
||||
project(googletest-download NONE)
|
||||
|
||||
|
|
Loading…
Reference in a new issue