From 0f220d473a6048c0f1267a96ed5cc18fa39ee61c Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Tue, 26 Nov 2019 10:10:55 +0100 Subject: 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 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') 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() -- cgit v1.2.3