summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2023-02-24 15:20:36 +0100
committerChristian Stenger <christian.stenger@qt.io>2023-02-27 09:08:28 +0000
commiteec0ea06078447beeb37b142bf60e53bdce211f0 (patch)
tree4155a4aef26d23029a7fe12dc89f0aefc2169b15 /CMakeLists.txt
parent380f7622de6e164465614cf12a98f4c00e2c92c4 (diff)
downloadqt-creator-eec0ea06078447beeb37b142bf60e53bdce211f0.tar.gz
Fix build with qbs as submodule and CMake < 3.18
Broke with 66d4e12a586509c7ff903bae633f4fa2ebdcc0ce. Change-Id: I71bf156b8bba27b3285aab39db56f2ec055bff0c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f474b95215..d52a1c8b65 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,19 @@ find_package(Qt6
COMPONENTS Concurrent Core Gui Network PrintSupport Qml Sql Widgets Xml Core5Compat ${QT_TEST_COMPONENT}
REQUIRED
)
+# hack for Qbs which still supports Qt5 and Qt6
+if (TARGET Qt6::Core5CompatPrivate)
+ if (CMAKE_VERSION VERSION_LESS 3.18)
+ set_property(TARGET Qt6::Core5CompatPrivate PROPERTY IMPORTED_GLOBAL TRUE)
+ endif()
+ add_library(Qt6Core5CompatPrivate ALIAS Qt6::Core5CompatPrivate)
+endif()
+if (TARGET Qt6::Core5Compat)
+ if (CMAKE_VERSION VERSION_LESS 3.18)
+ set_property(TARGET Qt6::Core5Compat PROPERTY IMPORTED_GLOBAL TRUE)
+ endif()
+ add_library(Qt6Core5Compat ALIAS Qt6::Core5Compat)
+endif()
# Common intermediate directory for QML modules which are defined via qt_add_qml_module()
set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml_modules")