<meta http-equiv="content-type" content="text/html; charset=utf-8"><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">Hi all,</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">If I build ITK in /home/doriad/build/ITK, and then in my .bashrc add:</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">export ITK_DIR=/home/doriad/build/ITK</span></font><br><br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">when I start a new terminal and configure a project that needs ITK, it is found no problem - all is well.</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">However, if I then install ITK (make install) to /home/doriad/bin (set with CMAKE_INSTALL_PREFIX), and add to .bashrc:</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">export PATH=/home/doriad/bin/:$PATH</span></font><br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">export PATH=/home/doriad/bin/bin:$</span></font><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">PATH</span></font><br>
<font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">export LD_LIBRARY_PATH=/home/ddoria/</span></font><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">bin/lib:$LD_LIBRARY_PATH</span></font><br>
<font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">export C_INCLUDE_PATH=/home/doriad/</span></font><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">bin/include:$C_INCLUDE_PATH</span></font><br>
<font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">export CPLUS_INCLUDE_PATH=/home/</span></font><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">doriad/bin/include:$CPLUS_</span></font><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">INCLUDE_PATH</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">and then in a new terminal try again with a clean folder of the project, ITK is not found:</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;"> CMake Error at Examples/CMakeLists.txt:19 (message):</span></font><br>
<font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;"> Cannot build without ITK. Please set ITK_DIR.</span></font><br><br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">I then tried setting ITK_DIR in the project's ccmake to /home/doriad/bin, but then I get this error:</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;"> CMake Error at /usr/share/cmake-2.8/Modules/</span></font><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">FindITK.cmake:90 (INCLUDE):</span></font><br>
<font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;"> include could not find load file:</span></font><br><br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;"> /home/doriad/bin/ITKConfig.</span></font><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">cmake</span></font><br>
<br><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">Am I missing something to have the ITK that is installed to a location on my PATH be automatically found?</span></font><br>
<br clear="all"><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;">Thanks,</span></font><font class="Apple-style-span" color="#888888" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font><div><font class="Apple-style-span" color="#333333" face="arial, sans-serif" size="2"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" color="#333333" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">David</span></font></div>