From 2b9b5d43f4bcb411eeac15e8a53800cb91585a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 18 Jul 2022 14:31:37 +0200 Subject: [PATCH] cmake: Generate prl and pri files for static plugins in shared Qt builds The CMake build system files are properly generated, but the qmake parts were missing. Change-Id: Icbcce3143db976c536c802ea2314bc3f2595da51 Reviewed-by: Alexandru Croitor --- cmake/QtPluginHelpers.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index d594702e3bc..1fa6afccad2 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -355,8 +355,9 @@ function(qt_internal_add_plugin target) endforeach() qt_register_target_dependencies("${target}" "${arg_PUBLIC_LIBRARIES}" "${qt_libs_private}") - if (NOT BUILD_SHARED_LIBS) + get_target_property(target_type "${target}" TYPE) + if(target_type STREQUAL STATIC_LIBRARY) # There's no point in generating pri files for qml plugins. We didn't do it in Qt5 times. if(NOT plugin_type_escaped STREQUAL "qml_plugin") qt_generate_plugin_pri_file("${target}" pri_file) @@ -462,8 +463,9 @@ function(qt_finalize_plugin target) _qt_internal_generate_win32_rc_file("${target}") endif() - # Generate .prl files for plugins of static Qt builds. - if(NOT BUILD_SHARED_LIBS) + # Generate .prl files for static plugins. + get_target_property(target_type "${target}" TYPE) + if(target_type STREQUAL STATIC_LIBRARY) if(arg_INSTALL_PATH) qt_generate_prl_file(${target} "${arg_INSTALL_PATH}") endif()