diff options
author | David Cole <david.cole@kitware.com> | 2011-11-01 18:26:43 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-11-01 18:26:43 (GMT) |
commit | a39c195bc56656e86b4d647f50f987eb955d240b (patch) | |
tree | 7d673d2d044da914f8873b3957eca31082263aa9 /Modules | |
parent | 55659c4ea932851c4d969b83e919c3dacec2505e (diff) | |
parent | 467ee368402b73756ac1b662b86cd0eee95bbe07 (diff) | |
download | CMake-a39c195bc56656e86b4d647f50f987eb955d240b.zip CMake-a39c195bc56656e86b4d647f50f987eb955d240b.tar.gz CMake-a39c195bc56656e86b4d647f50f987eb955d240b.tar.bz2 |
Merge topic 'qt4-deploy-module'
467ee36 Check plugin variables are defined before warning.
4571ea6 Don't resolve directories; are never relative.
9cfc920 Match fixup_qt4_executable with documentation.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/DeployQt4.cmake | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index bdf8360..4bf1b6c 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -56,7 +56,7 @@ # (or <plugins_dir>) relative to <executable> and store the result in # <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH. # -# INSTALL_QT4_EXECUTABLE(<executable> <qtplugins> [<libs> <dirs> <plugins_dir> <request_qt_conf>]) +# INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>]) # Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up # a Qt4 executable using BundleUtilities so it is standalone and can be # drag-and-drop copied to another machine as long as all of the system @@ -106,7 +106,8 @@ function(resolve_qt4_paths paths_var) set(${paths_var} ${paths_resolved} PARENT_SCOPE) endfunction() -function(fixup_qt4_executable executable qtplugins) +function(fixup_qt4_executable executable) + set(qtplugins ${ARGV1}) set(libs ${ARGV2}) set(dirs ${ARGV3}) set(plugins_dir ${ARGV4}) @@ -150,7 +151,6 @@ function(fixup_qt4_executable executable qtplugins) endforeach() resolve_qt4_paths(libs "${executable_path}") - resolve_qt4_paths(dirs "${executable_path}") if(write_qt_conf) set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}") @@ -225,9 +225,11 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var) else() string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) endif() - set(plugin_release "${${plugin_var}_RELEASE}") - set(plugin_debug "${${plugin_var}_DEBUG}") - if(NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}") + set(plugin_release_var "${plugin_var}_RELEASE") + set(plugin_debug_var "${plugin_var}_DEBUG") + set(plugin_release "${${plugin_release_var}}") + set(plugin_debug "${${plugin_debug_var}}") + 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") @@ -264,7 +266,6 @@ function(install_qt4_executable executable) endforeach() resolve_qt4_paths(libs) - resolve_qt4_paths(dirs) install(CODE " INCLUDE( \"${DeployQt4_cmake_dir}/DeployQt4.cmake\" ) |