View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013134CMakeModulespublic2012-04-15 17:232012-09-03 16:01
ReporterDaniel Franke 
Assigned ToClinton Stimpson 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake 2.8.7 
Target VersionFixed in Version 
Summary0013134: DeployQt4.cmake(fixup_qt4_executable) does not fix up plugins
DescriptionOr 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)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0029174)
Clinton Stimpson (developer)
2012-04-16 09:42

This was already fixed. Please save yourself some debugging time and use 2.8.8 RC2 at http://cmake.org/files/v2.8/ [^]
(0030852)
David Cole (manager)
2012-09-03 16:01

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-04-15 17:23 Daniel Franke New Issue
2012-04-16 03:13 Rolf Eike Beer Assigned To => Clinton Stimpson
2012-04-16 03:13 Rolf Eike Beer Status new => assigned
2012-04-16 09:42 Clinton Stimpson Note Added: 0029174
2012-04-16 09:42 Clinton Stimpson Status assigned => resolved
2012-04-16 09:42 Clinton Stimpson Resolution open => no change required
2012-09-03 16:01 David Cole Note Added: 0030852
2012-09-03 16:01 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team