Commit e95ccb16 authored by jcfr's avatar jcfr

ENH: Use variable Slicer_QtPlugins_DIR instead of hardcoded "lib/QtPlugins"

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16980 3bd1e089-480b-0410-8dfb-8563597acbee
parent 7e3814fb
......@@ -148,11 +148,11 @@ void qSlicerCoreApplicationPrivate::init()
this->discoverPythonPath();
#if defined(Q_WS_MAC)
// Override the Qt plugins search path - Used to locate the Qt imageformats plugins.
// See Slicer/CMake/SlicerBlockInstallQtImageFormatsPlugins.cmake
QStringList qtPluginsSearchPaths;
qtPluginsSearchPaths << this->SlicerHome + "lib/QtPlugins";
QCoreApplication::setLibraryPaths(qtPluginsSearchPaths);
// Override the Qt plugins search path - Used to locate the Qt imageformats plugins.
// See Slicer/CMake/SlicerBlockInstallQtImageFormatsPlugins.cmake
QStringList qtPluginsSearchPaths;
qtPluginsSearchPaths << this->SlicerHome + Slicer_INSTALL_QtPlugins_DIR;
QCoreApplication::setLibraryPaths(qtPluginsSearchPaths);
#endif
// Instantiate ErrorLogModel
......
......@@ -17,6 +17,6 @@ endif()
foreach(qpi ${qt_plugins})
install(PROGRAMS ${qpi}
DESTINATION ${Slicer_INSTALL_ROOT}/lib/QtPlugins/imageformats
DESTINATION ${Slicer_INSTALL_QtPlugins_DIR}/imageformats
)
endforeach()
......@@ -263,9 +263,14 @@ SET(Slicer_VERSION "${Slicer_VERSION_MAJOR}.${Slicer_VERSION_MINOR}")
SET(Slicer_VERSION_FULL "${Slicer_VERSION}.${Slicer_VERSION_PATCH}")
#-----------------------------------------------------------------------------
# Plugins and Modules install directories
# Qt plugins (imageformats, ...) relative directories
#------------------------------------------------------------------------------
SET(Slicer_QtPlugins_DIR "lib/QtPlugins")
SET(Slicer_INSTALL_QtPlugins_DIR "${Slicer_INSTALL_ROOT}/${Slicer_QtPlugins_DIR}")
#-----------------------------------------------------------------------------
# Plugins and Modules relative directories
#------------------------------------------------------------------------------
SET(Slicer_PLUGINS_BIN_DIR "plugins")
SET(Slicer_PLUGINS_LIB_DIR "plugins")
SET(Slicer_PLUGINS_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/plugins")
......
......@@ -76,8 +76,8 @@ function(gp_item_default_embedded_path_override item default_embedded_path_var)
set(path "@executable_path@/../@Slicer_QTLOADABLEMODULES_LIB_DIR@")
endif()
if(item MATCHES "lib/QtPlugins/imageformats/[^/]+\\.dylib$")
set(path "@executable_path@/../lib/QtPlugins/imageformats")
if(item MATCHES "@Slicer_QtPlugins_DIR@/imageformats/[^/]+\\.dylib$")
set(path "@executable_path@/../@Slicer_QtPlugins_DIR@/imageformats")
endif()
set(${default_embedded_path_var} "${path}" PARENT_SCOPE)
......@@ -103,7 +103,7 @@ function(fixup_bundle_with_plugins location app)
"${app_dir}/Contents/@Slicer_LIB_DIR@/*Python.so"
"${app_dir}/Contents/lib/Python/lib/*${suffix}"
"${app_dir}/Contents/lib/Python/lib/python2.6/lib-dynload/*.so"
"${app_dir}/Contents/lib/QtPlugins/imageformats/*${suffix}"
"${app_dir}/Contents/@Slicer_QtPlugins_DIR@/imageformats/*${suffix}"
)
foreach(lib ${candidates})
if(NOT lib MATCHES "(_debug|d[0-9])${suffix}$")
......
......@@ -36,6 +36,8 @@
#define Slicer_INSTALL_SHARE_DIR "@Slicer_SHARE_DIR@"
#define Slicer_INSTALL_ITKFACTORIES_DIR "@Slicer_ITKFACTORIES_DIR@"
#define Slicer_INSTALL_QtPlugins_DIR "@Slicer_QtPlugins_DIR@"
#define Slicer_INSTALL_PLUGINS_BIN_DIR "@Slicer_PLUGINS_BIN_DIR@"
#define Slicer_INSTALL_PLUGINS_LIB_DIR "@Slicer_PLUGINS_LIB_DIR@"
#define Slicer_INSTALL_PLUGINS_INCLUDE_DIR "@Slicer_PLUGINS_INCLUDE_DIR@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment