aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-09-07 09:50:15 +0200
committerEike Ziller <eike.ziller@qt.io>2020-09-07 10:13:39 +0000
commit102d8d48db92438eff0d59a7907bc18d42673ec5 (patch)
tree21d8fd6c094a7b4db6dfa1e2d85148aeafb2f2aa /CMakeLists.txt
parent7e8c3e91a19d9112aa12ef81ee42a160183bd7aa (diff)
CMake build: Make Qt6::Core5Compat available in a portable way
While porting to Qt6 we'll need the compat library at some places. Add a custom Qt6Core5Compat target that we can unconditionally use. For Qt5 it refers to a dummy target. For Qt6 it refers to the actual compat library. Task-number: QTCREATORBUG-24098 Change-Id: Idd2b9f285352f685cfe715eee3fa046dfb468873 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1282fe6206..753b98c09e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,10 +42,13 @@ endif()
find_package(Qt5
${IDE_QT_VERSION_MIN}
COMPONENTS Concurrent Core Gui Network PrintSupport Qml Quick
- QuickWidgets Sql Widgets Xml ${QT_TEST_COMPONENT}
+ QuickWidgets Sql Widgets Xml Core5Compat ${QT_TEST_COMPONENT}
REQUIRED
)
-find_package(Qt5 COMPONENTS LinguistTools)
+if (Qt5_VERSION VERSION_LESS 6.0.0)
+ install(TARGETS Qt6Core5Compat EXPORT QtCreator)
+endif()
+find_package(Qt5 COMPONENTS LinguistTools QUIET)
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg QUIET)
find_package(Threads)