diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-01-28 08:59:14 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-02-02 08:55:31 +0000 |
commit | 1221552377a5fa63d2f5f4364397ebbcec7a27cf (patch) | |
tree | 8e8aa9b9c7f4952b1ed7634cb1e4e953d16d204f /CMakeLists.txt | |
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 <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c226f78bdbb..c6f603c7981 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16) ## Add paths to check for cmake modules: list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -138,15 +138,8 @@ endif() add_subdirectory(doc) -# TODO: Remove when cmake_minimum_required greater than 3.12 -if (CMAKE_VERSION VERSION_GREATER 3.12) - find_package(Python3 COMPONENTS Interpreter) - set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND}) - set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) -else() - find_package(PythonInterp) -endif() -if (NOT PYTHONINTERP_FOUND) +find_package(Python3 COMPONENTS Interpreter) +if (NOT Python3_Interpreter_FOUND) message("No python interpreter found, skipping \"Dependencies\" install component.") else() get_target_property(_qmake_binary Qt5::qmake IMPORTED_LOCATION) @@ -161,7 +154,7 @@ else() endif() install(CODE " execute_process(COMMAND - \"${PYTHON_EXECUTABLE}\" + \"${Python3_EXECUTABLE}\" \"${CMAKE_CURRENT_LIST_DIR}/scripts/deployqt.py\" ${_llvm_arg} ${_elfutils_arg} |