[Insight-users] changes of compilation interface in ITK-4.0 (breaks my code)

Juan Cardelino juan.cardelino at gmail.com
Mon Apr 25 10:21:57 EDT 2011


Well, I think I was using ITK incorrectly:

Instead of using:
  TARGET_LINK_LIBRARIES( GeodesicActiveContourImageFilterInteractive
ITKCommon ITKBasicFilters  ITKStatistics ITKNumerics ITKIO ${LIBS})

I should use:
 TARGET_LINK_LIBRARIES( GeodesicActiveContourImageFilterInteractive
${ITK_LIBRARIES}  ${LIBS})

This part was my fault, I'm sorry for the noise. However, I still want
to know why cmake couldn't find ITK automatically.
Thanks again.

On Mon, Apr 25, 2011 at 11:16 AM, Juan Cardelino
<juan.cardelino at gmail.com> wrote:
> Dear All,
>            I was using ITK-4 from git from quite some time now. Mi
> version was a month old or so, so yesterday I pulled a new version
> (git pull on the source directory).
> It built and installed correctly. However, to my suprise, the
> installation directory was changed (from
> PREFIX/include/InsightToolkit-4.0 to PREFIX/include/ITK-4.0 and so
> on), and now my CMakeLists where unable to find ITK. I had to manually
> set the directory PREFIX/lib/cmake in my CMakeLists.txt. By the way,
> PREFIX is /usr/local, and I'm on an ubuntu 10.10 box, with 64 bits
> kernel.
> After being able to locate ITK, my compiled correctly but not linked
> because all the libraries where renamed to libITKxxxx-4.0.a. Is this
> the intented behaviour? Does this mean that I will need to change my
> CMakeLists.txt every time an ITK version comes out? I'm thinking about
> 4.0 4.1 4.2 etc.
> Can someone comment shortly on this?
> If so I guess I will have to update all my CMakeLists.
> Thanks in advance.
> Best regards,
>                     Juan
>


More information about the Insight-users mailing list