diff options
author | Arjen Hiemstra <ahiemstra@heimr.nl> | 2022-01-19 14:15:03 +0100 |
---|---|---|
committer | Arjen Hiemstra <ahiemstra@heimr.nl> | 2022-01-21 11:56:14 +0000 |
commit | 13d2e4a2a5a97dfceb61075ee760485d448fa36e (patch) | |
tree | 78c18c44793509c14d91c143db53afeabae83595 | |
parent | 5069d782f38826be1e6edb24383a19bde9c16d05 (diff) | |
download | extra-cmake-modules-13d2e4a2a5a97dfceb61075ee760485d448fa36e.tar.gz extra-cmake-modules-13d2e4a2a5a97dfceb61075ee760485d448fa36e.tar.bz2 |
ECMQmlModule: Add -Muri automoc option to make static builds work correctly
This is apparently needed for static QML plugins to work properly.
-rw-r--r-- | modules/ECMQmlModule.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ECMQmlModule.cmake b/modules/ECMQmlModule.cmake index aaff5dde..0f119628 100644 --- a/modules/ECMQmlModule.cmake +++ b/modules/ECMQmlModule.cmake @@ -261,6 +261,10 @@ function(ecm_add_qml_module ARG_TARGET) ${_ECM_QMLMODULE_PROPERTY_CLASSNAME} "${ARG_CLASSNAME}" ${_ECM_QMLMODULE_PROPERTY_DEPENDS} "" ) + + # -Muri is required for static QML plugins to work properly, see + # https://bugreports.qt.io/browse/QTBUG-82598 + set_target_properties(${ARG_TARGET} PROPERTIES AUTOMOC_MOC_OPTIONS -Muri=${ARG_URI}) endfunction() function(ecm_add_qml_module_dependencies ARG_TARGET) |