summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-11-26 10:10:55 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2019-12-04 10:48:06 +0000
commit0f220d473a6048c0f1267a96ed5cc18fa39ee61c (patch)
tree20b4c0bbaa908e86973466e5b2b8ae8e52dbbca7 /CMakeLists.txt
parent9eea24ed601d0aa243269fac64c9a65c3750d1b0 (diff)
Collect Json Metatypes from CMake's Automoc
This patch adds a new bootstrap tool which will read CMake's AutoGenInfo.json and ParseCache.txt to determine what the current list of json files is that needs to be passed to moc --collect-json option. Right now this is enabled for qt_add_module() with the option GENERATE_METATYPES. pro2cmake has also been updated to detect qmake's CONFIG += metatypes and to generate the above option for modules. The implementation lives in Qt6CoreMacros so it can eventually be used in the public facing apis. The generated meta types file is saved under the target property QT_MODULE_META_TYPES_FILE. Change-Id: I03709c662be81dd0912d0068c23ee2507bfe4383 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2b92df6853..d18e91a6f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,6 +56,9 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
## feature variables are available.
qt_set_language_standards()
+ #include CoreMacros() for qt6_generate_meta_types()
+ include(src/corelib/Qt6CoreMacros.cmake)
+
## Visit all the directories:
add_subdirectory(src)
endif()