Fix bad plugin paths.

This commit is contained in:
Mike McQuaid 2012-01-11 15:39:12 +00:00
parent a2123e8f3e
commit 0ac15353e0
1 changed files with 13 additions and 13 deletions

View File

@ -82,6 +82,7 @@
include(BundleUtilities) include(BundleUtilities)
set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}") set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
set(DeployQt4_apple_plugins_dir "PlugIns")
function(write_qt4_conf qt_conf_dir qt_conf_contents) function(write_qt4_conf qt_conf_dir qt_conf_contents)
set(qt_conf_path "${qt_conf_dir}/qt.conf") set(qt_conf_path "${qt_conf_dir}/qt.conf")
@ -130,6 +131,9 @@ function(fixup_qt4_executable executable)
set(qt_conf_dir "${executable}/Contents/Resources") set(qt_conf_dir "${executable}/Contents/Resources")
set(executable_path "${executable}") set(executable_path "${executable}")
set(write_qt_conf TRUE) set(write_qt_conf TRUE)
if(NOT plugins_dir)
set(plugins_dir "${DeployQt4_apple_plugins_dir}")
endif()
else() else()
get_filename_component(executable_path "${executable}" PATH) get_filename_component(executable_path "${executable}" PATH)
if(NOT executable_path) if(NOT executable_path)
@ -166,23 +170,19 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va
set(component ${ARGV5}) set(component ${ARGV5})
set(configurations ${ARGV6}) set(configurations ${ARGV6})
if(EXISTS "${plugin}") if(EXISTS "${plugin}")
if(plugins_dir)
set(plugins_dir "${plugins_dir}")
else()
if(APPLE)
set(plugins_dir "PlugIns")
else()
set(plugins_dir "plugins")
endif()
endif()
if(APPLE) if(APPLE)
if(NOT plugins_dir)
set(plugins_dir "${DeployQt4_apple_plugins_dir}")
endif()
set(plugins_path "${executable}/Contents/${plugins_dir}") set(plugins_path "${executable}/Contents/${plugins_dir}")
else() else()
get_filename_component(executable_path "${executable}" PATH) get_filename_component(plugins_path "${executable}" PATH)
if(NOT executable_path) if(NOT plugins_path)
set(executable_path ".") set(plugins_path ".")
endif()
if(plugins_dir)
set(plugins_path "${plugins_path}/${plugins_dir}")
endif() endif()
set(plugins_path "${executable_path}/${plugins_dir}")
endif() endif()
set(plugin_group "") set(plugin_group "")