[cmake-developers] [CMake 0013134]: DeployQt4.cmake(fixup_qt4_executable) does not fix up plugins
Mantis Bug Tracker
mantis at public.kitware.com
Sun Apr 15 17:23:34 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13134
======================================================================
Reported By: Daniel Franke
Assigned To:
======================================================================
Project: CMake
Issue ID: 13134
Category: Modules
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-04-15 17:23 EDT
Last Modified: 2012-04-15 17:23 EDT
======================================================================
Summary: DeployQt4.cmake(fixup_qt4_executable) does not fix
up plugins
Description:
Or better, it attempts to fix them up, but fails.
BundleUtilities.cmake states:
# FIXUP_BUNDLE(<app> <libs> <dirs>)
[...]
# If you pass plugins to fixup_bundle as the libs parameter, you should install
# them or copy them into the bundle before calling fixup_bundle. The "libs"
# parameter is a list of libraries that must be fixed up, but that cannot be
# determined by otool output analysis. (i.e., plugins)
And DeployQt4.cmake (fixup_qt4_executable) has:
142 foreach(plugin ${qtplugins})
143 set(installed_plugin_path "")
144 install_qt4_plugin("${plugin}" "${executable}" 1
installed_plugin_path "${plugins_dir}")
145 list(APPEND libs ${installed_plugin_path})
146 endforeach()
But 'installed_plugin_path' is always empty due to an error in the usage of
PARENT_SCOPE (it sets installed_plugin_path_VAR), thus 'libs' stays empty and
the plugins don't get fixed up. The patch below fixes this for me by using the
same variable name everywhere.
Index: DeployQt4.cmake
===================================================================
--- DeployQt4.cmake (revision 278)
+++ DeployQt4.cmake (working copy)
@@ -161,7 +161,7 @@
fixup_bundle("${executable}" "${libs}" "${dirs}")
endfunction()
-function(install_qt4_plugin_path plugin executable copy
installed_plugin_path_var)
+function(install_qt4_plugin_path plugin executable copy installed_plugin_path)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
set(configurations ${ARGV6})
@@ -210,15 +210,15 @@
endif()
file(INSTALL "${plugin}" DESTINATION "${plugins_path}"
${configurations} ${component})
endif()
- set(${installed_plugin_path_var} ${${installed_path_var}}
"${plugins_path}/${plugin_name}" PARENT_SCOPE)
+ set(installed_plugin_path "${plugins_path}/${plugin_name}"
PARENT_SCOPE)
endif()
endfunction()
-function(install_qt4_plugin plugin executable copy installed_plugin_path_var)
+function(install_qt4_plugin plugin executable copy installed_plugin_path)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
if(EXISTS "${plugin}")
- install_qt4_plugin_path("${plugin}" "${executable}" "${copy}"
"${installed_plugin_path_var}" "${plugins_dir}" "${component}")
+ install_qt4_plugin_path("${plugin}" "${executable}" "${copy}"
"${installed_plugin_path}" "${plugins_dir}" "${component}")
else()
if(QT_IS_STATIC)
string(TOUPPER "QT_${plugin}_LIBRARY" plugin_var)
@@ -232,10 +232,10 @@
if(DEFINED "${plugin_release_var}" AND DEFINED
"${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS
"${plugin_debug}")
message(WARNING "Qt plugin \"${plugin}\" not recognized
or found.")
endif()
- install_qt4_plugin_path("${plugin_release}" "${executable}"
"${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}"
"Release|RelWithDebInfo|MinSizeRel")
- install_qt4_plugin_path("${plugin_debug}" "${executable}"
"${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}"
"Debug")
+ install_qt4_plugin_path("${plugin_release}" "${executable}"
"${copy}" "${installed_plugin_path}" "${plugins_dir}" "${component}"
"Release|RelWithDebInfo|MinSizeRel")
+ install_qt4_plugin_path("${plugin_debug}" "${executable}"
"${copy}" "${installed_plugin_path}" "${plugins_dir}" "${component}" "Debug")
endif()
- set(installed_plugin_path_var "${installed_plugin_path_var}"
PARENT_SCOPE)
+ set(installed_plugin_path "${installed_plugin_path}" PARENT_SCOPE)
endfunction()
function(install_qt4_executable executable)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-04-15 17:23 Daniel Franke New Issue
======================================================================
More information about the cmake-developers
mailing list