Associate shared libpython library with install name directory
Associate shared libpython library with install name directory

On MacOSX, doing so will allow executable to link against a python library
belonging to a CMake installed tree without relying on a launcher or
setting DYLD_LIBRARY_PATH.

As illustrated below, this is consistent with the results obtained using
Autoconf based build system.

# Build directory using Autoconf:

$ otool -L python-2.7.3-autoconf/libpython2.7.dylib
python-2.7.3-autoconf/libpython2.7.dylib:
	/Volumes/Dashboards/Experimental/cpython-2.7.3-autoconf-install/lib/libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)
	/usr/lib/...
        [...]


# Install directory using Autoconf:

$ otool -L cpython-2.7.3-autoconf-install/lib/libpython2.7.dylib
cpython-2.7.3-autoconf-install/lib/libpython2.7.dylib:
	/Volumes/Dashboards/Experimental/cpython-2.7.3-autoconf-install/lib/libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)
	/usr/lib/...
        [...]




This commit ensure that the libpython built and installed using the CMake
build system also embed install dir information. The only difference is
that the library within the build directory embeds information relative to
the build directory. This is illustrated below:


# Build directory using CMake (with this commit):

$ otool -L cpython-2.7.3-build/lib/libpython2.7.dylib
cpython-2.7.3-build/lib/libpython2.7.dylib:
	/Volumes/Dashboards/Experimental/cpython-2.7.3-build/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/...
        [...]


# Install directory using CMake (with this commit):

$ otool -L cpython-2.7.3-install/lib/libpython2.7.dylib
cpython-2.7.3-install/lib/libpython2.7.dylib:
	/Volumes/Dashboards/Experimental/cpython-2.7.3-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/...
        [...]


# Build directory using CMake (*without* this commit):

$ otool -L cpython-2.7.3-build/lib/libpython2.7.dylib
cpython-2.7.3-build/lib/libpython2.7.dylib:
	/Volumes/Dashboards/Experimental/cpython-2.7.3-build/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/...
        [...]



# Install directory using CMake (*without* this commit):

$ otool -L cpython-2.7.3-install/lib/libpython2.7.dylib
cpython-2.7.3-install/lib/libpython2.7.dylib:
	libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/...
        [...]

davidsansome/python-cmake-buildsystem,jcfr/python-cmake-buildsystem,thewtex/python-cmake-buildsystem,thewtex/python-cmake-buildsystem,chuckatkins/python-cmake-buildsystem,adrianbroher/python-cmake-buildsystem,python-cmake-buildsystem/python-cmake-buildsystem,msmolens/python-cmake-buildsystem