<br><br><div class="gmail_quote">On Wed, May 27, 2009 at 10:30 AM, Darren Weber <span dir="ltr">&lt;<a href="mailto:darren.weber.lists@gmail.com">darren.weber.lists@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I&#39;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.<br>
<br>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):<br><br><span style="font-family: courier new,monospace;">    -D CMAKE_INCLUDE_PATH:PATH=${prefix}/include \</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    -D CMAKE_LIBRARY_PATH:PATH=${prefix}/lib \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    -D CMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/${distname} \</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    -D CMAKE_INSTALL_PREFIX:PATH=${prefix} \</span><br style="font-family: courier new,monospace;"><br>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?<br>

<br>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.<br><br>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&#39;m missing another cmake variable
setting to control this?<br>
<br>Take care,<br><font color="#888888">Darren<br><br>
</font></blockquote></div><br>PS, Also using these cmake variables:<br><br><span style="font-family: courier new,monospace;">        -D BUILD_SHARED_LIBS:BOOL=ON \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        -D CMAKE_SKIP_RPATH:BOOL=OFF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        -D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        -D CMAKE_INSTALL_RPATH:STRING=${prefix}/lib/InsightToolkit-3.12</span><br style="font-family: courier new,monospace;">
<br>