Commit afa67abe authored by jcfr's avatar jcfr
Browse files

COMP: Change build and install dir associated with plugins, scripted and loadable modules

FixBundle expects library executable to be located no more than one
directory deep. For that reason, plugins, loadable and scripted module
are now built and install following this layout:

 <slicer-build>/plugins
               /qt-scripted-modules
               /qt-loadable-modules

 <slicer-install>/plugins
                 /qt-scripted-modules
                 /qt-loadable-modules

For matter of consistency, this apply to linux, mac and windows.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16784 3bd1e089-480b-0410-8dfb-8563597acbee
parent 8ef37c03
......@@ -256,10 +256,10 @@ SET(Slicer_VERSION_FULL "${Slicer_VERSION}.${Slicer_VERSION_PATCH}")
# Plugins and Modules install directories
#------------------------------------------------------------------------------
SET(Slicer_PLUGINS_BIN_DIR "${Slicer_LIB_DIR}/Plugins")
SET(Slicer_PLUGINS_LIB_DIR "${Slicer_LIB_DIR}/Plugins")
SET(Slicer_PLUGINS_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/Plugins")
SET(Slicer_PLUGINS_SHARE_DIR "${Slicer_SHARE_DIR}/Plugins")
SET(Slicer_PLUGINS_BIN_DIR "plugins")
SET(Slicer_PLUGINS_LIB_DIR "plugins")
SET(Slicer_PLUGINS_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/plugins")
SET(Slicer_PLUGINS_SHARE_DIR "${Slicer_SHARE_DIR}/plugins")
SET(Slicer_INSTALL_PLUGINS_BIN_DIR "${Slicer_INSTALL_ROOT}${Slicer_PLUGINS_BIN_DIR}")
SET(Slicer_INSTALL_PLUGINS_LIB_DIR "${Slicer_INSTALL_ROOT}${Slicer_PLUGINS_LIB_DIR}")
......@@ -452,10 +452,10 @@ SET(vtkITK_DIR ${Slicer_BINARY_DIR}/Libs/vtkITK)
# Qt Loadable and Scripted Modules
#-----------------------------------------------------------------------------
IF(Slicer_BUILD_QTLOADABLEMODULES)
SET(Slicer_QTLOADABLEMODULES_BIN_DIR "${Slicer_LIB_DIR}/QTLoadableModules")
SET(Slicer_QTLOADABLEMODULES_LIB_DIR "${Slicer_LIB_DIR}/QTLoadableModules")
SET(Slicer_QTLOADABLEMODULES_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/QTLoadableModules")
SET(Slicer_QTLOADABLEMODULES_SHARE_DIR "${Slicer_SHARE_DIR}/QTLoadableModules")
SET(Slicer_QTLOADABLEMODULES_BIN_DIR "qt-loadable-modules")
SET(Slicer_QTLOADABLEMODULES_LIB_DIR "qt-loadable-modules")
SET(Slicer_QTLOADABLEMODULES_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/qt-loadable-modules")
SET(Slicer_QTLOADABLEMODULES_SHARE_DIR "${Slicer_SHARE_DIR}/qt-loadable-modules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "${Slicer_INSTALL_ROOT}${Slicer_QTLOADABLEMODULES_BIN_DIR}")
SET(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "${Slicer_INSTALL_ROOT}${Slicer_QTLOADABLEMODULES_LIB_DIR}")
......@@ -464,10 +464,10 @@ IF(Slicer_BUILD_QTLOADABLEMODULES)
ENDIF()
IF(Slicer_BUILD_QTSCRIPTEDMODULES)
SET(Slicer_QTSCRIPTEDMODULES_BIN_DIR "${Slicer_LIB_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_LIB_DIR "${Slicer_LIB_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_SHARE_DIR "${Slicer_SHARE_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_BIN_DIR "qt-scripted-modules")
SET(Slicer_QTSCRIPTEDMODULES_LIB_DIR "qt-scripted-modules")
SET(Slicer_QTSCRIPTEDMODULES_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/qt-scripted-modules")
SET(Slicer_QTSCRIPTEDMODULES_SHARE_DIR "${Slicer_SHARE_DIR}/qt-scripted-modules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "${Slicer_INSTALL_ROOT}${Slicer_QTSCRIPTEDMODULES_BIN_DIR}")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR "${Slicer_INSTALL_ROOT}${Slicer_QTSCRIPTEDMODULES_LIB_DIR}")
......
......@@ -62,18 +62,20 @@ function(gp_item_default_embedded_path_override item default_embedded_path_var)
set(path "@executable_path/../lib/Slicer3/ITKFactories")
endif()
if(item MATCHES "lib/Slicer3/Plugins/.*\\.dylib$")
set(path "@executable_path/../lib/Slicer3/Plugins")
set(Slicer_PLUGINS_LIB_DIR "@Slicer_PLUGINS_LIB_DIR@")
if(item MATCHES "${Slicer_PLUGINS_LIB_DIR}/.*\\.dylib$")
set(path "@executable_path/../${Slicer_PLUGINS_LIB_DIR}")
endif()
if(item MATCHES "lib/Slicer3/QTLoadableModules/.*\\.dylib$")
set(Slicer_QTLOADABLEMODULES_LIB_DIR "@Slicer_QTLOADABLEMODULES_LIB_DIR@")
if(item MATCHES "${Slicer_QTLOADABLEMODULES_LIB_DIR}/.*\\.dylib$")
message("QTLoadable ${item}")
set(path "@executable_path/../lib/Slicer3/QTLoadableModules")
set(path "@executable_path/../${Slicer_QTLOADABLEMODULES_LIB_DIR}")
endif()
if(item MATCHES "lib/Slicer3/QTLoadableModules/.*Python\\.so$")
if(item MATCHES "${Slicer_QTLOADABLEMODULES_LIB_DIR}/.*Python\\.so$")
message("QTLoadable ${item}")
set(path "@executable_path/../lib/Slicer3/QTLoadableModules")
set(path "@executable_path/../${Slicer_QTLOADABLEMODULES_LIB_DIR}")
endif()
if(item MATCHES "Plugins/imageformats/[^/]+\\.dylib$")
......@@ -94,13 +96,13 @@ function(fixup_bundle_with_plugins location app)
set(libs "")
file(GLOB_RECURSE candidates
"${app_dir}/Contents/lib/Slicer3/QTLoadableModules/*${suffix}"
"${app_dir}/Contents/lib/Slicer3/QTLoadableModules/*Python.so"
"${app_dir}/Contents/@Slicer_QTLOADABLEMODULES_LIB_DIR@/*${suffix}"
"${app_dir}/Contents/@Slicer_QTLOADABLEMODULES_LIB_DIR@/*Python.so"
"${app_dir}/Contents/lib/Slicer3/designer/*${suffix}"
"${app_dir}/Contents/lib/Slicer3/iconengines/*${suffix}"
"${app_dir}/Contents/lib/Slicer3/ITKFactories/*${suffix}"
"${app_dir}/Contents/lib/Slicer3/ITKFactories/*Plugin.so"
"${app_dir}/Contents/lib/Slicer3/Plugins/*${suffix}"
"${app_dir}/Contents/@Slicer_PLUGINS_LIB_DIR@/*${suffix}"
"${app_dir}/Contents/lib/Slicer3/*${suffix}"
"${app_dir}/Contents/lib/Slicer3/*Python.so"
"${app_dir}/Contents/lib/Python/lib/*${suffix}"
......@@ -117,7 +119,7 @@ function(fixup_bundle_with_plugins location app)
#
set(libs_path "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@")
list(APPEND libs_path "@VTK_DIR@/bin;@ITK_DIR@/bin;@Teem_DIR@/bin;@BatchMake_DIR@/bin;@OpenIGTLink_DIR@/bin;@CTK_DIR@/bin")
list(APPEND libs_path "@Slicer_BINARY_DIR@/lib/Slicer3;@Slicer_BINARY_DIR@/lib/Slicer3/QTLoadableModules;@Slicer_BINARY_DIR@/lib/Slicer3/Plugins;@Slicer_BINARY_DIR@/lib/Slicer3/iconengines")
list(APPEND libs_path "@Slicer_BINARY_DIR@/lib/Slicer3;@Slicer_BINARY_DIR@/@Slicer_QTLOADABLEMODULES_LIB_DIR@;@Slicer_BINARY_DIR@/@Slicer_PLUGINS_LIB_DIR@;@Slicer_BINARY_DIR@/lib/Slicer3/iconengines")
list(REMOVE_DUPLICATES libs)
list(REMOVE_DUPLICATES libs_path)
......
......@@ -801,8 +801,8 @@ proc launch_SetPaths {} {
set ::env(PYTHONPATH) "$::env(Slicer_HOME)/bin/Python$SEP$::env(PYTHONPATH)"
set ::env(PYTHONPATH) "$::env(Slicer_HOME)/lib/Slicer3$SEP$::env(PYTHONPATH)"
set ::env(PYTHONPATH) "$::env(Slicer_HOME)/lib/Slicer3/QTScriptedModules$SEP$::env(PYTHONPATH)"
set ::env(PYTHONPATH) "$::env(Slicer_HOME)/lib/Slicer3/QTLoadableModules$SEP$::env(PYTHONPATH)"
set ::env(PYTHONPATH) "$::env(Slicer_HOME)/@Slicer_QTSCRIPTEDMODULES_LIB_DIR@$SEP$::env(PYTHONPATH)"
set ::env(PYTHONPATH) "$::env(Slicer_HOME)/@Slicer_QTLOADABLEMODULES_LIB_DIR@$SEP$::env(PYTHONPATH)"
set ::env(PYTHONPATH) "$::env(PYTHON_DIR)/lib/lib-tk$SEP$::env(PYTHONPATH)"
set ::env(PYTHONPATH) "$::env(PYTHON_DIR)/lib/site-packages$SEP$::env(PYTHONPATH)"
......
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