Bill, <br><br>Please consider the solution I discussed in my previous email and things should work better :)<br><br>To summarise:<br><br>1) In External_ITKv4.cmake<br><br><pre><span>-DITK_INSTALL_</span>INSTALL_LIBRARY_DIR<span>:PATH=</span><span>${</span><span>Slicer_INSTALL_LIB_DIR</span><span>}
</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.</pre><br>2) Around line 9 of CMake/SlicerBlockInstallCMakeProjects.cmake, add the following:<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>Hth<br>Jc<br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 8:23 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">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">
I've have seen the same issues that you see. I have tried specifying<br>
-DITK_INSTALL_LIB_DIR:PATH=${Slicer_INSTALL_LIB_DIR}<br>
and it does not seem to change anything.<br>
<br>
What puzzles me is that a make package for ITKv4 (outside of slicer)<br>
produces a valid package.<br>
<br>
Bill<br>
<br>
On Fri, Feb 24, 2012 at 6:14 PM, Jean-Christophe Fillion-Robin<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:jchris.fillionr@kitware.com">jchris.fillionr@kitware.com</a>> wrote:<br>
> Hi Bill,<br>
><br>
> Thanks for working on the ITKv4 integration. I will try to provide<br>
> additional details and guidance below.<br>
><br>
> Slicer packaging system install its dependent project using cmake by<br>
> specifying explicitly which components should be installed in the Slicer<br>
> install tree.<br>
><br>
> I just run a "make package" in a Slicer-ITKv4 build tree, and I notice that<br>
> only the following libraries are installed:<br>
><br>
> <a href="http://libITKDICOMParser-4.1.so" target="_blank">libITKDICOMParser-4.1.so</a><br>
> <a href="http://libITKEXPAT-4.1.so" target="_blank">libITKEXPAT-4.1.so</a><br>
> <a href="http://libITKgiftiio-4.1.so" target="_blank">libITKgiftiio-4.1.so</a><br>
> <a href="http://libitkjpeg-4.1.so" target="_blank">libitkjpeg-4.1.so</a><br>
> <a href="http://libITKMetaIO-4.1.so" target="_blank">libITKMetaIO-4.1.so</a><br>
> <a href="http://libitkNetlibSlatec-4.1.so" target="_blank">libitkNetlibSlatec-4.1.so</a><br>
> <a href="http://libITKniftiio-4.1.so" target="_blank">libITKniftiio-4.1.so</a><br>
> <a href="http://libITKNrrdIO-4.1.so" target="_blank">libITKNrrdIO-4.1.so</a><br>
> <a href="http://libitkopenjpeg-4.1.so" target="_blank">libitkopenjpeg-4.1.so</a><br>
> <a href="http://libitkpng-4.1.so" target="_blank">libitkpng-4.1.so</a><br>
> <a href="http://libitktiff-4.1.so" target="_blank">libitktiff-4.1.so</a><br>
> <a href="http://libitkv3p_lsqr-4.1.so" target="_blank">libitkv3p_lsqr-4.1.so</a><br>
> <a href="http://libitkv3p_netlib-4.1.so" target="_blank">libitkv3p_netlib-4.1.so</a><br>
> <a href="http://libitkvcl-4.1.so" target="_blank">libitkvcl-4.1.so</a><br>
> <a href="http://libitkvnl-4.1.so" target="_blank">libitkvnl-4.1.so</a><br>
> <a href="http://libitkvnl_algo-4.1.so" target="_blank">libitkvnl_algo-4.1.so</a><br>
> <a href="http://libitkzlib-4.1.so" target="_blank">libitkzlib-4.1.so</a><br>
> <a href="http://libITKznz-4.1.so" target="_blank">libITKznz-4.1.so</a><br>
><br>
><br>
> 1) There libraries are located in ./lib folder whereas they are expected in<br>
> "./lib/Slicer-4.0". Looking at ITKv3 external project. The option<br>
><br>
> -DITK_INSTALL_LIB_DIR:PATH=${Slicer_INSTALL_LIB_DIR}<br>
><br>
> is passed.<br>
><br>
> See<br>
> <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<br>
> ITK_INSTALL_LIBRARY_DIR, ITK_INSTALL_ARCHIVE_DIR, ...<br>
> See<br>
> <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>
><br>
> -DITK_INSTALL_INSTALL_LIBRARY_DIR:PATH=${Slicer_INSTALL_LIB_DIR}<br>
><br>
> -DITK_INSTALL_INSTALL_ARCHIVE_DIR:PATH=${Slicer_INSTALL_LIB_DIR}<br>
><br>
> => This is something that should be documented in the migration guide if<br>
> ITKv4.<br>
> The variable ITK_INSTALL_LIB_DIR isn't valid anymore.<br>
><br>
><br>
><br>
><br>
> 2) The question regarding the components.<br>
><br>
> Within ITKv4 source code, the "itk_module_target_install" macro seems to<br>
> responsible of installing the target.<br>
><br>
> Seems no Component is specified in the install rule. It means it's not<br>
> possible to do a component based installation :( . It means that when ITKv4<br>
> is packaged by an other project all the headers, doc, etc ... will be<br>
> installed even if not needed. This something we would like to avoid in<br>
> Slicer.<br>
><br>
> See<br>
> <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>
> IF(NOT ITK_INSTALL_NO_LIBRARIES)<br>
> INSTALL(TARGETS ITKCommon itkvnl_inst<br>
> RUNTIME DESTINATION ${ITK_INSTALL_BIN_DIR_CM24} COMPONENT<br>
> RuntimeLibraries<br>
> LIBRARY DESTINATION ${ITK_INSTALL_LIB_DIR_CM24} COMPONENT<br>
> RuntimeLibraries<br>
> ARCHIVE DESTINATION ${ITK_INSTALL_LIB_DIR_CM24} COMPONENT Development)<br>
> ENDIF(NOT ITK_INSTALL_NO_LIBRARIES)<br>
><br>
><br>
> See<br>
> <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<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>
> // --------------<br>
> set(component ALL)<br>
> if(${ITK_VERSION_MAJOR} STREQUAL "3")<br>
> set(component RuntimeLibraries)<br>
> endif()<br>
> set(CPACK_INSTALL_CMAKE_PROJECTS<br>
> "${CPACK_INSTALL_CMAKE_PROJECTS};${ITK_DIR};ITK;${component};/")<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 CPACK_INSTALL_CMAKE_PROJECTS is here:<br>
> <a href="http://www.cmake.org/Wiki/CMake:CPackConfiguration" target="_blank">http://www.cmake.org/Wiki/CMake:CPackConfiguration</a><br>
><br>
><br>
><br>
> On Fri, Feb 24, 2012 at 4:56 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> 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>
>><br>
>> On Fri, Feb 24, 2012 at 4:42 PM, Jean-Christophe Fillion-Robin<br>
>> <<a href="mailto:jchris.fillionr@kitware.com">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>
>> ><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>
>> ><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">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<br>
>> >> 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">+1 919 869 8849</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Unpaid intern in BillsBasement at noware dot com<br>
><br>
><br>
><br>
><br>
> --<br>
> <a href="tel:%2B1%20919%20869%208849" value="+19198698849">+1 919 869 8849</a><br>
><br>
<br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>