diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-03-26 15:52:43 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2021-04-27 19:35:27 +0200 |
commit | 261a248042839c5bdd776328c109bcdd876606d2 (patch) | |
tree | 0722702dfe78ec530f2ab5b3394dff193dd46944 /cmake | |
parent | 7fd8997268b06c70380ad81d42c6e82c313d5219 (diff) |
Fix plugin SKIP_INSTALL option
If SKIP_INSTALL option is specified for the qt_internal_add_plugin
function the install_directory variable become empty and finalizer unable
to call qt_finalize_plugin, because of lack of the second argument. It
makes sense to use the INSTALL_PATH single argument instead.
Change-Id: I2d4b40c8cf812a834c0e045569b45a649d339508
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 361daa2990ddb70805d356ce5df7d8cfae8e1954)
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtPluginHelpers.cmake | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index f43b18f22f..b30798b76e 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -394,20 +394,29 @@ function(qt_internal_add_plugin target) endif() qt_internal_add_linker_version_script(${target}) - qt_add_list_file_finalizer(qt_finalize_plugin ${target} "${install_directory}") + set(finalizer_extra_args "") + if(NOT arg_SKIP_INSTALL) + list(APPEND finalizer_extra_args INSTALL_PATH "${install_directory}") + endif() + qt_add_list_file_finalizer(qt_finalize_plugin ${target} ${finalizer_extra_args}) - qt_enable_separate_debug_info(${target} "${install_directory}") - qt_internal_install_pdb_files(${target} "${install_directory}") + if(NOT arg_SKIP_INSTALL) + qt_enable_separate_debug_info(${target} "${install_directory}") + qt_internal_install_pdb_files(${target} "${install_directory}") + endif() endfunction() -function(qt_finalize_plugin target install_directory) +function(qt_finalize_plugin target) + cmake_parse_arguments(arg "" "INSTALL_PATH" "" ${ARGN}) if(WIN32 AND BUILD_SHARED_LIBS) _qt_internal_generate_win32_rc_file("${target}") endif() # Generate .prl files for plugins of static Qt builds. if(NOT BUILD_SHARED_LIBS) - qt_generate_prl_file(${target} "${install_directory}") + if(arg_INSTALL_PATH) + qt_generate_prl_file(${target} "${arg_INSTALL_PATH}") + endif() endif() endfunction() |