summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-08-21 16:59:17 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-08-23 11:04:20 +0200
commitdac557295bf6dfe6ededc8bad91f7a240a505333 (patch)
tree21c61148992d3baebf96a340c7866af185f11209 /CMakeLists.txt
parentbf3d834ab4ae3a60efb485a0645e402f58b63bbb (diff)
CMake: Fix tst_moc to build when tests are built as part of Qt tree
tst_moc uses qt_wrap_cpp, which tries to dispatch to qt6_wrap_cpp depending on the value of QT_DEFAULT_MAJOR_VERSION. That value is only set in Qt6CoreConfigExtras.cmake.in, which is not loaded as part of the qtbase build unless something does find_package(Qt6Core). Set the QT_DEFAULT_MAJOR_VERSION to 6 before including the Qt6CoreMacros in the qtbase top-level project. Change-Id: I7b81d89d965f755e51727007e68771ac3931ac55 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e31224ee4f..6aed77873d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,7 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
qt_set_language_standards()
#include CoreMacros() for qt6_generate_meta_types()
+ set(QT_DEFAULT_MAJOR_VERSION 6)
include(src/corelib/Qt6CoreMacros.cmake)
# Needed when building qtbase for android.