qt5base-lts/src/CMakeLists.txt
Leander Beernaert 0f220d473a 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>
2019-12-04 10:48:06 +00:00

61 lines
1.3 KiB
CMake

# special case skip regeneration
add_subdirectory(3rdparty)
function(find_or_build_bootstrap_names)
if (QT_WILL_BUILD_TOOLS)
add_subdirectory(tools/bootstrap) # bootstrap library
endif()
add_subdirectory(tools/moc)
add_subdirectory(tools/rcc)
add_subdirectory(tools/tracegen)
add_subdirectory(tools/cmake_automoc_parser)
endfunction()
find_or_build_bootstrap_names()
add_subdirectory(corelib)
if (QT_FEATURE_concurrent)
add_subdirectory(concurrent)
endif()
if (QT_FEATURE_sql)
add_subdirectory(sql)
endif()
if (QT_FEATURE_network)
add_subdirectory(network)
endif()
if (QT_FEATURE_xml)
add_subdirectory(xml)
endif()
add_subdirectory(tools)
if (QT_FEATURE_dbus)
add_subdirectory(dbus)
endif()
if(QT_FEATURE_gui)
add_subdirectory(gui)
if(QT_FEATURE_opengl)
add_subdirectory(openglextensions)
endif()
if(QT_FEATURE_widgets)
add_subdirectory(widgets)
if(QT_FEATURE_opengl)
add_subdirectory(opengl)
endif()
endif()
add_subdirectory(platformsupport)
add_subdirectory(platformheaders)
endif()
if (QT_FEATURE_testlib)
add_subdirectory(testlib)
endif()
if(QT_FEATURE_gui AND QT_FEATURE_widgets)
add_subdirectory(printsupport)
endif()
add_subdirectory(plugins)
add_subdirectory(winmain)
add_subdirectory(android)