COMP: fix packaging for linux DCMTK shared libraries

Be sure to include the symbolic links for the versioning.

Also remove APPLE branch since this is not called/needed for apple.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21949 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: On MacOSX, do not create duplicate of MRMLIDIOPlugin and MGHIOPlugin

This fix MacOSX warning "/path/to/plugin is already loaded"

Both MRMLIDIOPlugin and MGHIOPlugin were copied so that it exists both
a "dylib" and a "so" version of the file. This was initially committed
on the 2007-09-27 to work around a limitation of ITK preventing it from
loading plugin having ".dylib" extension. See Slicer3 r4454 [1]

Then 2 months later, on the 2007-11-19, a fix has been pushed in ITK so
that plugin having extension "dylib" are considered. See ITK commit 28b4a6ba [2]

This commit account for the ITK fix by removing the code in charge of
copying the plugin.

Lessons learned: When implementing a hack, it is a good practice to report
a bug upstream to track the limitation and also reference the bug in a
comment starting with either "# HACK" for CMake file or "// HACK" for
c/cpp files. It would give a hint to developer re-factoring the code.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer3?view=revision&revision=4454
[2] https://github.com/Kitware/ITK/commit/28b4a6ba
ENH: Move MacOSX configuration code for CLI factory to a better place.

As a slight improvement, the path is also appended only if it exists.
ENH: Simplify logic by appending path to CLI factory only if they exist.
STYLE: Do not check for version of CMake before including "BundleUtilities"

Since minimum required CMake version for Slicer is 2.8.9, this message
is not needed anymore.
COMP: Ensure Python library directory is considered when fixing up package

When the expression "@SLICER_PYTHON_LIB_DIR@" has been introduced
in commit r21252 [1], it was already resolving to an empty
string because since r15463 [2] the file SlicerBlockCTKAppLauncherSettings is
included in the Applications/SlicerApp/CMakeLists.txt.

Both the fixup script and the launcher settings have been updated to
use the variable "PYTHON_LIBRARY_PATH" introduced in the top-level
CMakeLists.txt by commit r16822 [3]

To prevent such error from happening again, a convenient macro named
"_fixup_paths_append" has been introduced. It basically check if the path
passed as parameter exists and append it to the list of paths. If not,
it throw an error.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21252
[2] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=15463
[3] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=16822
COMP: Ensure library paths used for BundleFixup are valid

The helper macro "_fixup_paths_append" is now used consistently to append
path to the "libs_path" variable.

Let's also note the following updates:

 - CMAKE_RUNTIME_OUTPUT_DIRECTORY is not used anymore, instead
${Slicer_BUILD_DIR}/@Slicer_BIN_DIR@ is used.

 - Path "@Slicer_BINARY_DIR@/@Slicer_QtPlugins_DIR@" is not considered
anymore since it didn't exist in the build tree. Instead, the plugin path
are composed using "${Slicer_BUILD_DIR}/@Slicer_BIN_DIR@"
COMP: Do now explicitly fixup CLI shared library

Considering that (1) CLI shared lirbary are dependency
of CLI executable and (2) CLI executable are already discovered by the
fixup mechanism. There are no need to use canidate pattern for CLI
shared library.
COMP: Simplify expression used in gp_item_default_embedded_path_override.
COMP: Remove hack forcing CMAKE_INSTALL_NAME_TOOL to be empty

In commit r21242 [1], CMAKE_INSTALL_NAME_TOOL has been disabled to ensure
the "gp_item_default_embedded_path_override" function could match
library that are expected to go in specific folders like "cli-modules",
"qt-loadable-modules", [...]. By disabling CMAKE_INSTALL_NAME_TOOL,
the match was possible using full path to each one of the
direct dependencies of a given library.

This approach saw its limitation when trying to have CLI executable
installed in "path/to/Contents/cli-modules" and the shared library copied
into "path/to/Contents/lib/Slicer-4.2/cli-modules". Indeed, the shared
library were systematically copied along side the executable in addition
to the the one existing in the "path/to/Contents/lib/Slicer-4.2/cli-modules"
directory.

This commit doesn't do the match based on the full path embedded in the
library, instead it globs for the expected library in the build tree and
then check if a given item name match the list of library "globed" in the
associated directory.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21242
STYLE: Easier configuration of fixup path in bundle script
BUG: Ensure library can be loaded from different place using @rpath/@loader