From 467ee368402b73756ac1b662b86cd0eee95bbe07 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 28 Oct 2011 17:33:21 +0100 Subject: [PATCH] Check plugin variables are defined before warning. --- Modules/DeployQt4.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index ef8dd1f1a..4bf1b6c4b 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -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")