summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPluginHelpers.cmake11
-rw-r--r--cmake/QtPriHelpers.cmake3
2 files changed, 9 insertions, 5 deletions
diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake
index ade09cb2a1..4b8a9c1beb 100644
--- a/cmake/QtPluginHelpers.cmake
+++ b/cmake/QtPluginHelpers.cmake
@@ -218,7 +218,9 @@ function(qt_internal_add_plugin target)
endforeach()
qt_register_target_dependencies("${target}" "${arg_PUBLIC_LIBRARIES}" "${qt_libs_private}")
- qt_generate_plugin_pri_file("${target}" pri_file)
+ if (NOT BUILD_SHARED_LIBS)
+ qt_generate_plugin_pri_file("${target}" pri_file)
+ endif()
if (NOT arg_SKIP_INSTALL)
# Handle creation of cmake files for consumers of find_package().
@@ -256,10 +258,9 @@ function(qt_internal_add_plugin target)
DESTINATION "${config_install_dir}"
COMPONENT Devel
)
- qt_install(FILES
- "${pri_file}"
- DESTINATION "${INSTALL_MKSPECSDIR}/modules"
- )
+ if(pri_file)
+ qt_install(FILES "${pri_file}" DESTINATION "${INSTALL_MKSPECSDIR}/modules")
+ endif()
# Make the export name of plugins be consistent with modules, so that
# qt_add_resource adds its additional targets to the same export set in a static Qt build.
diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake
index 2dbacc59e6..7d4b6143ec 100644
--- a/cmake/QtPriHelpers.cmake
+++ b/cmake/QtPriHelpers.cmake
@@ -186,6 +186,9 @@ function(qt_generate_module_pri_file target)
get_target_property(config_module_name ${target} _qt_config_module_name)
get_target_property(qmake_module_config ${target} ${property_prefix}QT_QMAKE_MODULE_CONFIG)
+ if (arg_HEADER_MODULE)
+ list(APPEND qmake_module_config "no_link")
+ endif()
if(qmake_module_config)
string(REPLACE ";" " " module_build_config "${qmake_module_config}")
set(module_build_config "\nQT.${config_module_name}.CONFIG = ${module_build_config}")