Change minimum CMake version to 3.7.2. (#23134)

* Change minimum CMake version to 3.7.2.

This moves our oldest supported Linux back up to today minus 5 years, Debian 9 from 2017 comes with 3.7.2.

* Enable more policies.
This commit is contained in:
Billy O'Neal 2022-02-17 10:46:49 -08:00 committed by GitHub
parent f54a7b0013
commit 805811e16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 37 deletions

View File

@ -138,7 +138,7 @@ We hope that they will make both forwards and backwards compatibility easier.
- This `cmake_minimum_required` should be bumped every time a new version
of CMake is added to `vcpkgTools.xml`, as should the
`cmake_minimum_required` in all of the helper `CMakeLists.txt` files.
- `vcpkg.cmake` must assume a version of CMake back to 3.1 in general
- `vcpkg.cmake` must assume a version of CMake back to 3.7.2 in general
- Specific functions and options may assume a greater CMake version;
if they do, make sure to comment that function or option
with the required CMake version.

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.7.2)
project (faad VERSION 2.9.1)
option(FAAD_BUILD_BINARIES "Build faad2 binaries" OFF)

View File

@ -1,7 +1,7 @@
{
"name": "faad2",
"version": "2.9.1",
"port-version": 4,
"port-version": 5,
"description": "Freeware Advanced Audio (AAC) Decoder",
"homepage": "https://sourceforge.net/projects/faac/",
"supports": "windows",

View File

@ -30,13 +30,12 @@ function(z_vcpkg_add_fatal_error ERROR)
endif()
endfunction()
set(Z_VCPKG_CMAKE_REQUIRED_MINIMUM_VERSION "3.1")
set(Z_VCPKG_CMAKE_REQUIRED_MINIMUM_VERSION "3.7.2")
if(CMAKE_VERSION VERSION_LESS Z_VCPKG_CMAKE_REQUIRED_MINIMUM_VERSION)
message(FATAL_ERROR "vcpkg.cmake requires at least CMake ${Z_VCPKG_CMAKE_REQUIRED_MINIMUM_VERSION}.")
endif()
# this policy is required for this file; thus, CMake 3.1 is required.
cmake_policy(PUSH)
cmake_policy(SET CMP0054 NEW)
cmake_policy(VERSION 3.7.2)
include(CMakeDependentOption)
@ -201,16 +200,6 @@ endfunction()
# Determine whether the toolchain is loaded during a try-compile configuration
get_property(Z_VCPKG_CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE)
if(CMAKE_VERSION VERSION_LESS "3.6.0")
set(Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES ON)
else()
set(Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES OFF)
endif()
if(Z_VCPKG_CMAKE_IN_TRY_COMPILE AND Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES)
include("${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL)
endif()
if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
endif()
@ -626,7 +615,7 @@ function(x_vcpkg_install_local_dependencies)
if(Z_VCPKG_TARGET_TRIPLET_PLAT MATCHES "^(windows|uwp)$")
# Install CODE|SCRIPT allow the use of generator expressions
cmake_policy(SET CMP0087 NEW)
cmake_policy(SET CMP0087 NEW) # CMake 3.14
z_vcpkg_set_powershell_path()
if(NOT IS_ABSOLUTE "${arg_DESTINATION}")
@ -807,25 +796,13 @@ set(Z_VCPKG_UNUSED "${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}")
# Propogate these values to try-compile configurations so the triplet and toolchain load
if(NOT Z_VCPKG_CMAKE_IN_TRY_COMPILE)
if(Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES)
file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" Z_VCPKG_CHAINLOAD_FILE_CMAKE)
file(TO_CMAKE_PATH "${Z_VCPKG_ROOT_DIR}" Z_VCPKG_ROOT_DIR_CMAKE)
file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake"
"set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n"
"set(VCPKG_TARGET_ARCHITECTURE \"${VCPKG_TARGET_ARCHITECTURE}\" CACHE STRING \"\")\n"
"set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n"
"set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${Z_VCPKG_CHAINLOAD_FILE_CMAKE}\" CACHE STRING \"\")\n"
"set(Z_VCPKG_ROOT_DIR \"${Z_VCPKG_ROOT_DIR_CMAKE}\" CACHE STRING \"\")\n"
)
else()
list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
VCPKG_TARGET_TRIPLET
VCPKG_TARGET_ARCHITECTURE
VCPKG_APPLOCAL_DEPS
VCPKG_CHAINLOAD_TOOLCHAIN_FILE
Z_VCPKG_ROOT_DIR
)
endif()
list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
VCPKG_TARGET_TRIPLET
VCPKG_TARGET_ARCHITECTURE
VCPKG_APPLOCAL_DEPS
VCPKG_CHAINLOAD_TOOLCHAIN_FILE
Z_VCPKG_ROOT_DIR
)
endif()
if(Z_VCPKG_HAS_FATAL_ERROR)

View File

@ -2078,7 +2078,7 @@
},
"faad2": {
"baseline": "2.9.1",
"port-version": 4
"port-version": 5
},
"fadbad": {
"baseline": "2.1.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "67b420585d5f99b7dec259912abd2d7edcfb9492",
"version": "2.9.1",
"port-version": 5
},
{
"git-tree": "a1ec8e5247412b2ba6584c63307f88fe91d12251",
"version": "2.9.1",