diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-17 15:10:00 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-21 10:49:31 +0200 |
commit | 185cf1ca3b1188973cc7996c7df8128d3a476638 (patch) | |
tree | b489eb2661f8e0b6d41e42b306e6cc8458b27944 | |
parent | 8f23717655a7442f89cc0d2c19df5b8017d644b1 (diff) |
CMake: Use new __QT_INTERNAL_OUTPUT_MOC_JSON_FILES option in API
The implementation of _qt_internal_add_repc_files and
qt6_reps_from_headers were using qt_manual_moc which is internal API
not available for user projects.
Use the newly introduced __QT_INTERNAL_OUTPUT_MOC_JSON_FILES in
qtbase's qt6_wrap_cpp to run moc and extract the metatypes json files.
Fixes: QTBUG-95832
Change-Id: I64969478a2c1226aa0b73d458acd30c695d7521e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 7e58270087f705ab1b5b499c0849baac6a2f56ea)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r-- | src/remoteobjects/Qt6RemoteObjectsMacros.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/remoteobjects/Qt6RemoteObjectsMacros.cmake b/src/remoteobjects/Qt6RemoteObjectsMacros.cmake index fe12eb9..21b764e 100644 --- a/src/remoteobjects/Qt6RemoteObjectsMacros.cmake +++ b/src/remoteobjects/Qt6RemoteObjectsMacros.cmake @@ -53,7 +53,8 @@ function(_qt_internal_add_repc_files type target) get_filename_component(outfilename ${it} NAME_WE) get_filename_component(extension ${it} EXT) if ("${extension}" STREQUAL ".h" OR "${extension}" STREQUAL ".hpp") - qt_manual_moc(qtro_moc_files OUTPUT_MOC_JSON_FILES json_list ${it}) + qt6_wrap_cpp(qtro_moc_files "${it}" + __QT_INTERNAL_OUTPUT_MOC_JSON_FILES json_list) set(infile ${json_list}) set_source_files_properties(${qtro_moc_files} PROPERTIES HEADER_FILE_ONLY ON) list(APPEND outfiles ${qtro_moc_files}) @@ -99,7 +100,8 @@ function(qt6_reps_from_headers target) list(POP_FRONT ARGV) foreach(it ${ARGV}) get_filename_component(outfilename ${it} NAME_WE) - qt_manual_moc(qtro_moc_files OUTPUT_MOC_JSON_FILES json_list ${it}) + qt6_wrap_cpp(qtro_moc_files "${it}" + __QT_INTERNAL_OUTPUT_MOC_JSON_FILES json_list) set(infile ${json_list}) set_source_files_properties(${qtro_moc_files} PROPERTIES HEADER_FILE_ONLY ON) list(APPEND outfiles ${qtro_moc_files}) |