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-20 19:31:43 +0200 |
commit | 7e58270087f705ab1b5b499c0849baac6a2f56ea (patch) | |
tree | 4790f62a679fb106d1641900fbf33dbf753c6de6 | |
parent | dd5171ed63b4e78c8e930800096c7705cb529b1d (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.
Pick-to: 6.2
Fixes: QTBUG-95832
Change-Id: I64969478a2c1226aa0b73d458acd30c695d7521e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-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}) |