diff options
author | Eike Ziller <[email protected]> | 2022-01-28 08:59:14 +0100 |
---|---|---|
committer | Eike Ziller <[email protected]> | 2022-02-02 08:55:31 +0000 |
commit | 1221552377a5fa63d2f5f4364397ebbcec7a27cf (patch) | |
tree | 8e8aa9b9c7f4952b1ed7634cb1e4e953d16d204f /src | |
parent | 275dcc8f8aae242c2260454543cbaa51508dae0c (diff) |
Require CMake 3.16 and remove workarounds
CMake 3.16 is available on the major Linux distributions nowadays,
so we can get rid of some workarounds.
Change-Id: I32500375748f33c3e40fbd7a08824d823f817a8f
Reviewed-by: Cristian Adam <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/qtcreatorcdbext/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/tools/iostool/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/tools/sdktool/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/tools/wininterrupt/CMakeLists.txt | 2 |
4 files changed, 9 insertions, 21 deletions
diff --git a/src/libs/qtcreatorcdbext/CMakeLists.txt b/src/libs/qtcreatorcdbext/CMakeLists.txt index 5b03103bc88..3797afd1cf2 100644 --- a/src/libs/qtcreatorcdbext/CMakeLists.txt +++ b/src/libs/qtcreatorcdbext/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake") @@ -60,17 +60,9 @@ add_qtc_library(qtcreatorcdbext qtc_library_enabled(_library_enabled qtcreatorcdbext) if (_library_enabled) - # TODO: Remove when cmake_minimum_required greater than 3.12 - if (CMAKE_VERSION VERSION_GREATER 3.12) - find_package(Python3 3.8 COMPONENTS Development) - set(PYTHONLIBS_FOUND ${Python3_Development_FOUND}) - set(PYTHON_LIBRARIES ${Python3_LIBRARIES}) - set(PYTHON_INCLUDE_DIR ${Python3_INCLUDE_DIRS}) - else() - find_package(PythonLibs 3.8) - endif() + find_package(Python3 3.8 COMPONENTS Development) - if (NOT ${PYTHONLIBS_FOUND}) + if (NOT ${Python3_Development_FOUND}) message(WARNING "PythonLibs (at least version 3.8) not found. qtcreatorcdbext will be built without Python support.") return() endif() @@ -80,7 +72,7 @@ if (_library_enabled) set(PythonRegex "^(.*)/(.*)/(python([0-9]+)_d)${CMAKE_IMPORT_LIBRARY_SUFFIX}$") endif() - foreach(lib IN LISTS PYTHON_LIBRARIES) + foreach(lib IN LISTS Python3_LIBRARIES) if (lib MATCHES ${PythonRegex}) if (CMAKE_BUILD_TYPE STREQUAL "Debug") set(PythonZipFileName "python${CMAKE_MATCH_4}_d.zip") @@ -105,8 +97,8 @@ if (_library_enabled) endif() extend_qtc_library(qtcreatorcdbext - DEPENDS "${PYTHON_LIBRARIES}" - INCLUDES "${PYTHON_INCLUDE_DIR}" + DEPENDS "${Python3_LIBRARIES}" + INCLUDES "${Python3_INCLUDE_DIRS}" DEFINES WITH_PYTHON=1 SOURCES pycdbextmodule.cpp pycdbextmodule.h diff --git a/src/tools/iostool/CMakeLists.txt b/src/tools/iostool/CMakeLists.txt index 230f5b91f43..e02bf7463d4 100644 --- a/src/tools/iostool/CMakeLists.txt +++ b/src/tools/iostool/CMakeLists.txt @@ -21,9 +21,5 @@ add_qtc_executable(iostool ) if (TARGET iostool) - if (CMAKE_VERSION VERSION_LESS 3.13) - target_link_libraries(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") - else() - target_link_options(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") - endif() + target_link_options(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") endif() diff --git a/src/tools/sdktool/CMakeLists.txt b/src/tools/sdktool/CMakeLists.txt index 486ec21d071..7726969b307 100644 --- a/src/tools/sdktool/CMakeLists.txt +++ b/src/tools/sdktool/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake") diff --git a/src/tools/wininterrupt/CMakeLists.txt b/src/tools/wininterrupt/CMakeLists.txt index b16e2e1e65b..4a41fa7b08f 100644 --- a/src/tools/wininterrupt/CMakeLists.txt +++ b/src/tools/wininterrupt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake") |