diff options
author | John Thacker <johnthacker@gmail.com> | 2022-04-21 20:19:56 -0400 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2022-04-21 20:24:52 -0400 |
commit | 3407992cb4205ff24c713797a938302405570619 (patch) | |
tree | 061fcafaa33d6551d6946a0d40b57655b53eadee /CMakeLists.txt | |
parent | 4bb16383a3f514cff9cc7cac650a1d0c441466de (diff) |
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index be741bd942..c99d67d9d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |