diff options
author | Eike Ziller <eike.ziller@qt.io> | 2023-01-23 11:44:31 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2023-01-24 15:35:46 +0000 |
commit | 06c4df37b9052b591a05d04ffc93ebf6f7edae17 (patch) | |
tree | 6073fcb62ba1e3cf58b3ba9cd180ca690f59923b /CMakeLists.txt | |
parent | f37aa909ac56d84bde92a5ee6650d578cd871196 (diff) | |
download | qt-creator-06c4df37b9052b591a05d04ffc93ebf6f7edae17.tar.gz |
CMake build: Remove usages of Qt5_VERSION
and remove checks for Qt < 6.2, since that is our minimum version.
Except for sdktool and qml2puppet.
Change-Id: Id36cd1a15a5a6e5480e4ae5d0a8ffaea4b2a1864
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 376e6cc60c..d70dab026c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,37 +70,23 @@ find_package(Qt5 COMPONENTS Concurrent Core Gui Network PrintSupport Qml Sql Widgets Xml Core5Compat ${QT_TEST_COMPONENT} REQUIRED ) -if (Qt5_VERSION VERSION_LESS 6.0.0) - install(TARGETS Qt6Core5Compat EXPORT QtCreator) - # Specify standards conformance mode to MSVC 2017 and later - # Qt6 has the values as part of the Qt6::Platform target interface - if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910) - add_compile_options(/permissive- /Zc:__cplusplus) - endif() - if (CMAKE_CXX_COMPILER_ID STREQUAL GNU) - add_compile_options(-Wno-missing-field-initializers) - endif() -else() - # Common intermediate directory for QML modules which are defined via qt_add_qml_module() - set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml_modules") +# Common intermediate directory for QML modules which are defined via qt_add_qml_module() +set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml_modules") - # This includes the code that will enable higher compiler warnings level (/W3 for MSVC, -Wall -Wextra for GCC) - # This is controlled by QT_COMPILE_OPTIONS_DISABLE_WARNINGS target property. - include(QtCompilerFlags) +# This includes the code that will enable higher compiler warnings level (/W3 for MSVC, -Wall -Wextra for GCC) +# This is controlled by QT_COMPILE_OPTIONS_DISABLE_WARNINGS target property. +include(QtCompilerFlags) - if (MSVC AND QT_FEATURE_static_runtime) - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") - endif() +if (MSVC AND QT_FEATURE_static_runtime) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") endif() + find_package(Qt5 COMPONENTS LinguistTools QUIET) find_package(Qt5 COMPONENTS Quick QuickWidgets Designer DesignerComponents Help SerialPort Svg Tools QUIET) find_package(Threads) find_package(Clang QUIET) -if (Qt5_VERSION VERSION_LESS 6.0.0) - find_package(KF5SyntaxHighlighting QUIET) -endif() # Crashpad set(CRASHPAD_BACKEND_URL "" CACHE STRING "Crashpad backend URL") |