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.
This commit is contained in:
David Cole 2011-11-01 14:26:43 -04:00 committed by CMake Topic Stage
commit a39c195bc5

View File

@ -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\" )