Slicer: 2145-support-for-installing-extension-from-file 178bd4e1

Author Committer Branch Timestamp Parent
jcfr jcfr 2145-support-for-installing-extension-from-file 2013-05-17 18:05:19 2145-support-for-installing-extension-from-file 3df88ffe
Affected Issues 0003051: CLI from extensions are not working
Changeset

BUG: Ensure library can be loaded from different place using @rpath

Before this commit, attempt have been made (r18311, r18325, r18581) to
install both built-in CLI and extension CLI executable in a folder
located at some depth of the main Slicer executable. This was needed
because all libraries were referenced based on the location of the main
Slicer executable using "@executable_path". This was working only in the
case of built-in CLI but wasn't scaling very well for the extension CLI
executable. Indeed, being able to both differentiate the different
installed extension and keeping the depth to 1 level wasn't easily
feasible:

/path/to/Slicer.app/Contents/MacOS/Slicer
/path/to/Slicer.app/Contents/cli-modules/MyCLI
/path/to/Slicer.app/Contents/Extensions-21855/SkullStripper/cli-modules/MyCLI

A solution could have been to install extensions directly in "Slicer.app"
folder and update the cli install sub dir to get something like:

/path/to/Slicer.app/Extensions-21855/SkullStripper/MyCLI

While possible, it would have remain a special case to maintain.

Instead, by using "@rpath", CLI modules can now be installed in the Slicer
standard location "Slicer_CLIMODULES_LIB_DIR" instead of "Slicer_CLIMODULES_SUBDIR".
This commit remove the special case which never worked (issue 0003051)

Waiting the topic "tweak-bundleutilities-for-rpath" is fully matured and
integrated in CMake, use custom version of BundleUtilities and GetPrerequisites.
See http://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/tweak-bundleutilities-for-rpath

Since our custom version of the CMake modules now consider "~/usr/.*/lib",
the implementation of "gp_resolved_file_type_override" has been removed.

Remove the hack specific to LibArchive (introduced by commit r19615), since
the library is fixed up using the default library matching pattern, it
will be installed in the expected location.

SlicerExecutionModel has also been updated to link the CLI executable
and library with "-rpath" so that they can resolve the location of Slicer
libraries.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22023 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Applications/SlicerApp/CMakeLists.txt Diff File
mod - Base/CLI/CMakeLists.txt Diff File
mod - Base/QTCLI/qSlicerCLIExecutableModuleFactory.cxx Diff File
mod - Base/QTCLI/qSlicerCLIModuleFactoryHelper.cxx Diff File
add - CMake/BundleUtilitiesWithRPath.cmake Diff File
add - CMake/GetPrerequisitesWithRPath.cmake Diff File
mod - CMake/SlicerCPack.cmake Diff File
mod - CMake/SlicerCPackBundleFixup.cmake.in Diff File
mod - CMake/SlicerExtensionCPack.cmake Diff File
mod - CMake/SlicerExtensionCPackBundleFixup.cmake.in Diff File
mod - CMake/UseSlicer.cmake.in Diff File
mod - CMakeLists.txt Diff File
mod - SuperBuild/External_SlicerExecutionModel.cmake Diff File