forked from qt-creator/qt-creator
Fix build with qbs as submodule and CMake < 3.18
Broke with 66d4e12a58.
Change-Id: I71bf156b8bba27b3285aab39db56f2ec055bff0c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user