From ca2979cc16c689a775ce7ea50c05fd7e2fcffb7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 7 Aug 2022 15:40:58 +0200 Subject: [PATCH] cmake: Move qt_install call into qt_generate_plugin_pri_file The same way qt_generate_module_pri_file does it. Change-Id: I42047ce7d23e8a289535041ccace8b0f0140ea12 Reviewed-by: Alexandru Croitor --- cmake/QtPluginHelpers.cmake | 5 +---- cmake/QtPriHelpers.cmake | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index dfcdedb370..84060ae214 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -471,10 +471,7 @@ function(qt_finalize_plugin target) # We didn't do it in Qt5 times. get_target_property(plugin_type "${target}" QT_PLUGIN_TYPE) if(NOT plugin_type STREQUAL "qml_plugin") - qt_generate_plugin_pri_file("${target}" pri_file) - if(pri_file) - qt_install(FILES "${pri_file}" DESTINATION "${INSTALL_MKSPECSDIR}/modules") - endif() + qt_generate_plugin_pri_file("${target}") endif() endif() endfunction() diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake index 0611179863..e1a9a7b228 100644 --- a/cmake/QtPriHelpers.cmake +++ b/cmake/QtPriHelpers.cmake @@ -594,7 +594,7 @@ endfunction() # - generic # - platform, if the plugin is not the default QPA plugin # Otherwise, this variable is empty. -function(qt_generate_plugin_pri_file target pri_file_var) +function(qt_generate_plugin_pri_file target) get_target_property(plugin_name ${target} OUTPUT_NAME) get_target_property(plugin_type ${target} QT_PLUGIN_TYPE) get_target_property(qmake_plugin_type ${target} QT_QMAKE_PLUGIN_TYPE) @@ -633,7 +633,8 @@ QT_PLUGIN.${plugin_name}.CLASS_NAME = ${plugin_class_name} QT_PLUGIN.${plugin_name}.module_config = ${module_config} QT_PLUGINS += ${plugin_name} ") - set(${pri_file_var} "${pri_file}" PARENT_SCOPE) + + qt_install(FILES "${pri_file}" DESTINATION "${INSTALL_MKSPECSDIR}/modules") endfunction() # Creates mkspecs/qconfig.pri which contains public global features among other things.