<br>Hi Mike,<br><br>I've updated MacPorts to ITK 3.14.0, please see this wiki page for details:<br><a href="http://www.vtk.org/Wiki/ITK_MacPorts_Package_Maintainers">http://www.vtk.org/Wiki/ITK_MacPorts_Package_Maintainers</a><br>
<br>FYI, in the wiki, I commented on several CMake issues. Also, I've made some notes in the Portfile about the issues with a shared library installation, ie:<br><font size="2"><br style="font-family: courier new,monospace;">
</font><pre><font size="2"><span style="font-family: courier new,monospace;"># Notes on RPATH settings for the shared dylib build and install:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># CMake book, Appendix A, p 234: "CMAKE_SKIP_BUILD_RPATH: Do not include RPATHs</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># in the build tree. Normally CMake uses the build tree for the RPATH when</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># building executables etc. on systems that use RPATH. When the software is</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># installed the executables etc. are relinked by CMake to have the install</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># RPATH. If this variable is set to true then the software is always built with</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># no RPATH."</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># CMake book, Appendix B, p. 301: "... SKIP_BUILD_RPATH is a boolean specifying</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># whether to skip automatic generation of an rpath allowing the target to run</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># from the build tree. BUILD_WITH_INSTALL_RPATH is a boolean specifying whether</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># to link the target in the build tree with the INSTALL_RPATH. This takes</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># precedence over SKIP_BUILD_RPATH and avoids the need for relinking before</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># installation."</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># Using CMAKE_SKIP_BUILD_RPATH:BOOL=OFF, we get all the executables and dylibs</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># built with the $build.dir in the rpath. For this to work, we must also have</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF. After the build, at the destroot</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># phase, all the installation candidates (which excludes the examples and</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># testing binaries) have their rpath settings reset to the INSTALL_RPATH (which</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># should point to $prefix..., not the $destroot location).</span></font><br>
<br>variant shared description "build shared libraries (default)" {<br> configure.args-delete \<br> -DBUILD_SHARED_LIBS:BOOL=OFF<br> configure.args-append \<br> -DBUILD_SHARED_LIBS:BOOL=ON \<br>
-DCMAKE_SKIP_RPATH:BOOL=OFF \<br> -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \<br> -DCMAKE_INSTALL_RPATH:STRING=${itkLibPath}<br>}<br><br></pre><br>Another way to do it is to build with the install rpath, but that breaks the build unless you provide an environment setting for the DYLD_LIBRARY_PATH (or something like that). This was adopted for the build in the vtk5 port in MacPorts and I believe that it's also adopted in the fink port.<br>
<br>Take care,<br>Darren<br><br><br><br><br><br><div class="gmail_quote">On Mon, Jun 8, 2009 at 8:39 AM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></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;">Is there a hidden setting in the CMake files to enable the use of the "install_name" on ITK dynamic libraries built on OS X?<br>
<br>
I build ITK 3.14.0 with SHARED_LIBRARIES=ON, installed to my preferred CMAKE_INSTALL_PREFIX location, built my project and tried to launch and I get the dreaded error that the itk libraries can not be found. And yet when I check my build directory and pick an ITK library and inspect it using otool, the install_name is set for the build directory. So I guess these are stripped off during the installation? Why? If they can be stripped off, why can't they be changed to the installation path?<br>
<br>
Or is this preferred way to use ITK as static libraries? Or from the Build directory?<br>
<br>
_________________________________________________________<br>
Mike Jackson <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer Dayton, Ohio<br>
<br>
<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br>