[Insight-users] build and install into 'InsightToolkit-3.12'
Darren Weber
darren.weber.lists at gmail.com
Wed May 27 13:49:17 EDT 2009
On Wed, May 27, 2009 at 10:30 AM, Darren Weber <darren.weber.lists at gmail.com
> wrote:
>
> I'm working on a MacPort for InsightToolkit at 3.12.0, and the port has a
> non-default installation location to /opt/local/lib/InsightToolkit-3.12/
> (and similar include path of /opt/local/include/InsightToolkit-3.12/). I
> made the decision to provide this version specific path, so it may be
> possible to install multiple versions of the library within the MacPorts
> system. The InsightToolkit specifies very tight compatibility versions
> (e.g., ITK 3.12.0 has compatibility only for 3.12.0), so any software that
> builds on it will either require a specific version dependency or it must
> keep up with the current version available in MacPorts (assuming this
> practice of very tight compatibility continues). In case any software that
> is stable and requires a dependency on a specific version of ITK is included
> in MacPorts, it should be possible to get any version specific dependencies
> resolved and installed.
>
> However, cmake is not installing into this version specific path. The
> configure uses the following command line options to cmake (among others,
> where prefix=/opt/local):
>
> -D CMAKE_INCLUDE_PATH:PATH=${prefix}/include \
> -D CMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
> -D CMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/${distname} \
> -D CMAKE_INSTALL_PREFIX:PATH=${prefix} \
>
> Yet cmake installs into a DESTDIR/${prefix}/lib/InsightToolkit regardless
> (and similar include path). Am I missing a cmake configuration variable
> that will correct this? Is this a bug in cmake 2.6?
>
> Also, this raised a port issue because the cmake macro FindITK.cmake is
> managed by a cmake port (under
> /opt/local/share/cmake-2.6/Modules/FindITK.cmake). Rather than hack that
> file directly, this port does several things. First it creates a symlink
> from PREFIX/lib/InsightToolkit to PREFIX/lib/InsightToolkit-3.12 (and
> likewise for the include path, so FindITK.cmake might work and the symlinks
> can be easily changed to any version specific install(s)). It also makes a
> copy of FindITK.cmake into FindITK-3.12.cmake and modifies the content of
> that file to indicate the include and lib paths are
> .../InsightToolkit-3.12/. Furthermore, the
> PREFIX/lib/InsightToolkit-3.12/ITKConfig.cmake was modified to point to this
> install path also.
>
> I guess it is a bug in cmake that the
> CMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/InsightToolkit-3.12 is not
> actually used as the install path (it defaults back to
> ${prefix}/lib/InsightToolkit). It does use this variable setting to update
> all the RPATH settings for the .dylib and some other binaries (OSX build),
> but then it does not actually install to this path. Is the install path
> hard-wired or am I'm missing another cmake variable setting to control this?
>
> Take care,
> Darren
>
>
PS, Also using these cmake variables:
-D BUILD_SHARED_LIBS:BOOL=ON \
-D CMAKE_SKIP_RPATH:BOOL=OFF \
-D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \
-D CMAKE_INSTALL_RPATH:STRING=${prefix}/lib/InsightToolkit-3.12
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090527/2862b178/attachment.htm>
More information about the Insight-users
mailing list