<br>In MacPorts, a FindITK.cmake module is located in<br><span style="font-family: courier new,monospace;">/opt/local/share/cmake-2.6/Modules/FindITK.cmake</span><br><br>The ITK 3.12.0 port will be installed to (or similar version specific locations):<br>
<span style="font-family: courier new,monospace;">/opt/local/lib/InsightToolkit-3.12</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/opt/local/include/InsightToolkit-3.12</span><br>
With symlinks:<br><span style="font-family: courier new,monospace;">/opt/local/lib/</span><span style="font-family: courier new,monospace;">InsightToolkit -&gt; </span><span style="font-family: courier new,monospace;">InsightToolkit-3.12</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">/opt/local/include/</span><span style="font-family: courier new,monospace;">InsightToolkit -&gt; </span><span style="font-family: courier new,monospace;">InsightToolkit-3.12</span><br>


<br>For any project, like itkHelloWorld, we can add the following to the CMakeLists.txt file:<br><span style="font-family: courier new,monospace;">SET (ITK_DIR /opt/local/lib/InsightToolkit-3.12)</span><br><br>However, some unsuspecting software port might not be so lucky, so it should be easy to tweak the FindITK.cmake module for this (in case some other ports rely on it).  What is the most effective way to tweak the module so it will find this unconventional ITK installation?  Is it enough to add or replace unix paths in FindITK.cmake?  For example,<br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">     52     # Look in standard UNIX install locations.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">            /opt/local/lib/InsightToolkit-3.12</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">     53     /usr/local/lib/InsightToolkit</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">     54     /usr/lib/InsightToolkit</span><br style="font-family: courier new,monospace;">
<br>If that were done, what is the path precedence?  Imagine there is a custom installation in /usr/local/lib/InsightToolkit, but the MacPorts library should take precedence over that for any other MacPorts installations that depend on ITK 3.12.<br>
<br>Take care,<br>Darren<br><br>