diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-07-12 14:53:06 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2022-10-13 19:47:32 +0200 |
commit | a21f49320a3c2546b025c4037398d052046bf3e7 (patch) | |
tree | 23a1c184a8f7b14b115a42245570626c97a10092 /src/qml/Qt6QmlBuildInternals.cmake | |
parent | 67bb71a051a562da1c778efa6c99cf64922adb80 (diff) |
Add explicit dependency on 'Qml_sync_headers' for QML modules
Add dependency on 'Qml_sync_headers' for all QML modules that are built
in the qtdeclarative build tree.
'moc' requires QtQml/qqmlextensionplugin.h to process IID in the
generated plugin source code. Since the '_autgen/timestamp' target
doesn't have the 'Qml_sync_headers' target in its dependency chain,
the header file is not created by syncqt before the 'moc' run. We need
to make this explicitly, because CMake doesn't add the main target
dependencies to the dependency list of the '_autgen/timestamp' target.
Change-Id: I1a199b4044e1dd9caddf7c0a9d75d59860893f60
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlBuildInternals.cmake')
-rw-r--r-- | src/qml/Qt6QmlBuildInternals.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake index cf27049b1d..af7d4fad04 100644 --- a/src/qml/Qt6QmlBuildInternals.cmake +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -310,6 +310,13 @@ function(qt_internal_add_qml_module target) FOLLOW_FOREIGN_VERSIONING ) + if(TARGET "${target}" AND NOT target STREQUAL "Qml") + qt_internal_add_autogen_sync_header_dependencies(${target} Qml) + endif() + if(TARGET "${arg_PLUGIN_TARGET}" AND NOT target STREQUAL arg_PLUGIN_TARGET) + qt_internal_add_autogen_sync_header_dependencies(${arg_PLUGIN_TARGET} Qml) + endif() + if(output_targets) set(plugin_export_targets) set(backing_lib_export_targets) |