Hi Bill, <br><br>Thanks for working on the ITKv4 integration. I will try to provide additional details and guidance below.<br><br>Slicer packaging system install its dependent project using cmake by specifying explicitly which components should be installed in the Slicer install tree. <br>
<br>I just run a "make package" in a Slicer-ITKv4 build tree, and I notice that only the following libraries are installed:<br>
<div>
<br>
<div><a href="http://libITKDICOMParser-4.1.so" target="_blank">libITKDICOMParser-4.1.so</a></div><div><a href="http://libITKEXPAT-4.1.so" target="_blank">libITKEXPAT-4.1.so</a></div><div><a href="http://libITKgiftiio-4.1.so" target="_blank">libITKgiftiio-4.1.so</a></div>
<div><a href="http://libitkjpeg-4.1.so" target="_blank">libitkjpeg-4.1.so</a></div><div><a href="http://libITKMetaIO-4.1.so" target="_blank">libITKMetaIO-4.1.so</a></div><div><a href="http://libitkNetlibSlatec-4.1.so" target="_blank">libitkNetlibSlatec-4.1.so</a></div>
<div><a href="http://libITKniftiio-4.1.so" target="_blank">libITKniftiio-4.1.so</a></div><div><a href="http://libITKNrrdIO-4.1.so" target="_blank">libITKNrrdIO-4.1.so</a></div><div><a href="http://libitkopenjpeg-4.1.so" target="_blank">libitkopenjpeg-4.1.so</a></div>
<div>
<a href="http://libitkpng-4.1.so" target="_blank">libitkpng-4.1.so</a></div><div><a href="http://libitktiff-4.1.so" target="_blank">libitktiff-4.1.so</a></div><div><a href="http://libitkv3p_lsqr-4.1.so" target="_blank">libitkv3p_lsqr-4.1.so</a></div>
<div><a href="http://libitkv3p_netlib-4.1.so" target="_blank">libitkv3p_netlib-4.1.so</a></div>
<div><a href="http://libitkvcl-4.1.so" target="_blank">libitkvcl-4.1.so</a></div><div><a href="http://libitkvnl-4.1.so" target="_blank">libitkvnl-4.1.so</a></div><div><a href="http://libitkvnl_algo-4.1.so" target="_blank">libitkvnl_algo-4.1.so</a></div>
<div><a href="http://libitkzlib-4.1.so" target="_blank">libitkzlib-4.1.so</a></div>
<div><a href="http://libITKznz-4.1.so" target="_blank">libITKznz-4.1.so</a></div><br><br>1) There libraries are located in ./lib folder whereas they are expected in "./lib/Slicer-4.0". Looking at ITKv3 external project. The option <br>
<pre><span>-DITK_INSTALL_LIB_DIR:PATH=</span><span>${</span><span>Slicer_INSTALL_LIB_DIR</span><span>}</span></pre> is passed. <br><br>See <a href="https://github.com/Slicer/Slicer/blob/master/SuperBuild/External_ITKv3.cmake#L52" target="_blank">https://github.com/Slicer/Slicer/blob/master/SuperBuild/External_ITKv3.cmake#L52</a><br>
<br>It means the same thing should probably be done for ITKv4 external project.<br><br>Looking at the CMakeLists.txt, there is indeed a variables named ITK_INSTALL_LIBRARY_DIR, ITK_INSTALL_ARCHIVE_DIR, ... <br>See <a href="http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;h=d9ac50f81439c17f490d1cd8fb00f07afc861015;hb=HEAD#l50" target="_blank">http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;h=d9ac50f81439c17f490d1cd8fb00f07afc861015;hb=HEAD#l50</a><br>
<br>In the case of ITKv4, we should probably set the following:<br><pre><span>-DITK_INSTALL_</span>INSTALL_LIBRARY_DIR<span>:PATH=</span><span>${</span><span>Slicer_INSTALL_LIB_DIR</span><span>}<br>
</span><span>-DITK_INSTALL_</span>INSTALL_ARCHIVE_DIR<span>:PATH=</span><span>${</span><span>Slicer_INSTALL_LIB_DIR</span><span>}</span>
<br>=> This is something that should be documented in the migration guide if ITKv4. <br>The variable <span>ITK_INSTALL_LIB_DIR </span>isn't valid anymore.<br><span></span></pre><br><br><br>2) The question regarding the components. <br>
<br>Within ITKv4 source code, the "itk_module_target_install" macro seems to responsible of installing the target. <br><br>Seems no Component is specified in the install rule. It means it's not possible to do a component based installation :( . It means that when ITKv4 is packaged by an other project all the headers, doc, etc ... will be installed even if not needed. This something we would like to avoid in Slicer.<br>
<br>See <span></span><span><a href="http://itk.org/gitweb?p=ITK.git;a=blob;f=CMake/ITKModuleMacros.cmake;h=b9458d73e2f2df2bf85220da7ad09d2934d78be5;hb=HEAD#l194" target="_blank">http://itk.org/gitweb?p=ITK.git;a=blob;f=CMake/ITKModuleMacros.cmake;h=b9458d73e2f2df2bf85220da7ad09d2934d78be5;hb=HEAD#l194</a><br>
<br><br>Within ITKv3, a component was specified. <br><br></span><font size="1"><span style="font-family:courier new,monospace">IF(NOT ITK_INSTALL_NO_LIBRARIES)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> INSTALL(TARGETS ITKCommon itkvnl_inst</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> RUNTIME DESTINATION ${ITK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> LIBRARY DESTINATION ${ITK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> ARCHIVE DESTINATION ${ITK_INSTALL_LIB_DIR_CM24} COMPONENT Development)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> ENDIF(NOT ITK_INSTALL_NO_LIBRARIES)</span><br>
</font><br><span><br>See <a href="http://itk.org/gitweb?p=ITK.git;a=blob;f=Code/Common/CMakeLists.txt;h=55749ea90e6d8d253d882b5a9cf7524cd92bcf7c;hb=389c62087f77cf116cf53039f4d667a544c824bc#l168" target="_blank">http://itk.org/gitweb?p=ITK.git;a=blob;f=Code/Common/CMakeLists.txt;h=55749ea90e6d8d253d882b5a9cf7524cd92bcf7c;hb=389c62087f77cf116cf53039f4d667a544c824bc#l168</a><br>
<br>The workaround the component issue would be to add the following line in </span><a href="https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockInstallCMakeProjects.cmake#L9" target="_blank">https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockInstallCMakeProjects.cmake#L9</a> <br>
<br>// --------------<br>set(component ALL)<br>if(${ITK_VERSION_MAJOR} STREQUAL "3")<br> set(component <span>RuntimeLibraries</span>)<br>endif()<span><br>set</span><span>(</span><span>CPACK_INSTALL_CMAKE_PROJECTS</span> <span>"${CPACK_INSTALL_CMAKE_PROJECTS};${ITK_DIR};ITK;${</span>component<span>};/"</span><span>)</span><br>
// --------------<br><br><br>After applying this two fixes, let me know how it goes.<br>Thanks<br>Jc<br><br><br>Ps: Documentation about <span>CPACK_INSTALL_CMAKE_PROJECTS</span> is here: <a href="http://www.cmake.org/Wiki/CMake:CPackConfiguration" target="_blank">http://www.cmake.org/Wiki/CMake:CPackConfiguration</a><br>
<br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 4:56 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jc,<br>
<br>
Please consider me a newbie regarding packaging. And, I have not<br>
read/analyzed your e-mail. ITKv4, make package, creates a valid and<br>
usable package. Why is that not sufficient for Slicer4?<br>
<br>
Bill<br>
<div><div><br>
On Fri, Feb 24, 2012 at 4:42 PM, Jean-Christophe Fillion-Robin<br>
<<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>> wrote:<br>
> Hi Bill,<br>
><br>
> Are you packaging on linux or mac ?<br>
><br>
> //-----------------------------------<br>
> Linux / Windows:<br>
><br>
> Within Slicer, ITK is told to installed itself in the file<br>
> SlicerBlockInstallCMakeProject<br>
> s.cmake<br>
><br>
> See<br>
> <a href="https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockInstallCMakeProjects.cmake#L9" target="_blank">https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockInstallCMakeProjects.cmake#L9</a><br>
><br>
> You can see that the current system expects the ITK libraries to be<br>
> associated with the RuntimeLibraries component.<br>
><br>
> => Is it still the case with ITKv4 ?<br>
><br>
> This file is itself included from here:<br>
> <a href="https://github.com/Slicer/Slicer/blob/master/CMake/SlicerCPack.cmake#L32" target="_blank">https://github.com/Slicer/Slicer/blob/master/CMake/SlicerCPack.cmake#L32</a><br>
><br>
><br>
> //-----------------------------------<br>
> MacOSX:<br>
><br>
> The fixup bundle mechanism expects the libraries to exist in<br>
> ITK_LIBRARY_DIRS<br>
> See<br>
> <a href="https://github.com/Slicer/Slicer/blob/master/Utilities/LastConfigureStep/SlicerCompleteBundles.cmake.in#L201" target="_blank">https://github.com/Slicer/Slicer/blob/master/Utilities/LastConfigureStep/SlicerCompleteBundles.cmake.in#L201</a><br>
><br>
> Is ITK_LIBRARY_DIRS properly set with ITKConfig.cmake ?<br>
><br>
> Hth<br>
> Jc<br>
><br>
><br>
> On Fri, Feb 24, 2012 at 4:11 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Folks,<br>
>><br>
>> I'm trying to package Slicer4 with ITKv4.<br>
>><br>
>> 1) for ITKv4, make package produces a proper tarball that I can untar and<br>
>> use.<br>
>> 2) for Sllicer4, make package does not contain the ITKv4 includes.<br>
>> Also, the package contains ITKv4's ThirdParty libraries, but none of<br>
>> the other ITK libraries.<br>
>><br>
>> So, is there some special requirement in Slicer4 that must be present<br>
>> to achieve a proper package?<br>
>><br>
>> Bill<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>
>> Kitware offers ITK Training Courses, for more information visit:<br>
>> <a href="http://kitware.com/products/protraining.html" target="_blank">http://kitware.com/products/protraining.html</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <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-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
><br>
><br>
><br>
><br>
> --<br>
> <a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
><br>
<br>
<br>
<br>
</div></div><span><font color="#888888">--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br><br>
</div>