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 &quot;make package&quot; 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 &quot;./lib/Slicer-4.0&quot;. 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>=&gt; This is something that should be documented in the migration guide if ITKv4. <br>The variable  <span>ITK_INSTALL_LIB_DIR </span>isn&#39;t valid anymore.<br><span></span></pre><br><br><br>2) The question regarding the components. <br>


<br>Within ITKv4 source code, the &quot;itk_module_target_install&quot; macro seems to responsible of installing the target. <br><br>Seems no Component is specified in the install rule. It means it&#39;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 &quot;3&quot;)<br>  set(component <span>RuntimeLibraries</span>)<br>endif()<span><br>set</span><span>(</span><span>CPACK_INSTALL_CMAKE_PROJECTS</span> <span>&quot;${CPACK_INSTALL_CMAKE_PROJECTS};${ITK_DIR};ITK;${</span>component<span>};/&quot;</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">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</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>
&lt;<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>&gt; wrote:<br>
&gt; Hi Bill,<br>
&gt;<br>
&gt; Are you packaging on linux or mac ?<br>
&gt;<br>
&gt; //-----------------------------------<br>
&gt; Linux / Windows:<br>
&gt;<br>
&gt; Within Slicer, ITK is told to installed itself in the file<br>
&gt; SlicerBlockInstallCMakeProject<br>
&gt; s.cmake<br>
&gt;<br>
&gt; See<br>
&gt; <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>






&gt;<br>
&gt; You can see that the current system expects the ITK libraries to be<br>
&gt; associated with the RuntimeLibraries component.<br>
&gt;<br>
&gt; =&gt;  Is it still the case with ITKv4 ?<br>
&gt;<br>
&gt; This file is itself included from here:<br>
&gt; <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>
&gt;<br>
&gt;<br>
&gt; //-----------------------------------<br>
&gt; MacOSX:<br>
&gt;<br>
&gt; The fixup bundle mechanism expects the libraries to exist in<br>
&gt; ITK_LIBRARY_DIRS<br>
&gt; See<br>
&gt; <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>






&gt;<br>
&gt; Is ITK_LIBRARY_DIRS properly set with ITKConfig.cmake ?<br>
&gt;<br>
&gt; Hth<br>
&gt; Jc<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Feb 24, 2012 at 4:11 PM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Folks,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m trying to package Slicer4 with ITKv4.<br>
&gt;&gt;<br>
&gt;&gt; 1) for ITKv4, make package produces a proper tarball that I can untar and<br>
&gt;&gt; use.<br>
&gt;&gt; 2) for Sllicer4, make package does not contain the ITKv4 includes.<br>
&gt;&gt; Also, the package contains ITKv4&#39;s ThirdParty libraries, but none of<br>
&gt;&gt; the other ITK libraries.<br>
&gt;&gt;<br>
&gt;&gt; So, is there some special requirement in Slicer4 that must be present<br>
&gt;&gt; to achieve a proper package?<br>
&gt;&gt;<br>
&gt;&gt; Bill<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; <a href="http://kitware.com/products/protraining.html" target="_blank">http://kitware.com/products/protraining.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; <a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
&gt;<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>