CMake: Bump minimum CMake version to 3.10
Linux distributions that have a version less than 3.10 are either almost at end of support (Debian Stretch), or will be supported by Wireshark 3.6 LTS (RHEL 7, SLES 12). The Windows minimum is already 3.13. Increasing the minimum required means that policies CMP0069 and CMP0071 are automatically set to NEW, and we can use VERSION_GREATER_EQUAL. Fix an error in the Qt version comparison; it's Qt 5.14 that first required macOS 10.13 High Sierra, not Qt 5.15.
This commit is contained in:
parent
4bb16383a3
commit
3407992cb4
|
@ -19,13 +19,7 @@ if(WIN32)
|
|||
# Needed for add_custom_command() WORKING_DIRECTORY generator expressions
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
else()
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
endif()
|
||||
if(POLICY CMP0069)
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0071)
|
||||
cmake_policy(SET CMP0071 NEW)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
endif()
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
|
@ -1415,14 +1409,13 @@ if (QT_FOUND)
|
|||
# https://doc.qt.io/qt-5.11/supported-platforms-and-configurations.html
|
||||
# https://doc.qt.io/qt-5.15/supported-platforms.html
|
||||
# https://doc-snapshots.qt.io/qt6-dev/supported-platforms.html
|
||||
# CMake < 3.7 doesn't support VERSION_GREATER_EQUAL.
|
||||
if(Qt${qtver}Widgets_VERSION VERSION_GREATER "5.999.999")
|
||||
if(Qt${qtver}Widgets_VERSION VERSION_GREATER_EQUAL "6.0.0")
|
||||
set(MIN_MACOS_VERSION 10.14)
|
||||
elseif(Qt5Widgets_VERSION VERSION_GREATER "5.14.999")
|
||||
elseif(Qt5Widgets_VERSION VERSION_GREATER_EQUAL "5.14.0")
|
||||
set(MIN_MACOS_VERSION 10.13)
|
||||
elseif(Qt5Widgets_VERSION VERSION_GREATER "5.11.999")
|
||||
elseif(Qt5Widgets_VERSION VERSION_GREATER_EQUAL "5.12.0")
|
||||
set(MIN_MACOS_VERSION 10.12)
|
||||
elseif(Qt5Widgets_VERSION VERSION_GREATER "5.9.999")
|
||||
elseif(Qt5Widgets_VERSION VERSION_GREATER_EQUAL "5.10.0")
|
||||
set(MIN_MACOS_VERSION 10.11)
|
||||
endif()
|
||||
if(CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS MIN_MACOS_VERSION)
|
||||
|
|
|
@ -66,9 +66,7 @@ else()
|
|||
option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" OFF)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER "3.8.99")
|
||||
option(ENABLE_LTO "Use Link Time Optimization (release configuration only)" OFF)
|
||||
endif()
|
||||
option(ENABLE_LTO "Use Link Time Optimization (release configuration only)" OFF)
|
||||
|
||||
if(WIN32)
|
||||
option(ENABLE_VLD "Enable Visual Leak Detect in Debug configuration" OFF)
|
||||
|
|
Loading…
Reference in New Issue