[Insight-developers] Changes in ITKConfig.cmake

Brad King brad.king at kitware.com
Thu Apr 3 13:54:36 EDT 2008


Gaëtan Lehmann wrote:
> Le 3 avr. 08 à 17:13, Luis Ibanez a écrit :
>> could you please elaborate on the details of why
>> ITK_INCLUDE_DIR was making the builds of the Insight
>> Journal fail.
> 
> That's because of that code from the IJMacros.txt:
> 
>       #most packages define a Package_INCLUDE_DIR variable, so we'll
> check for
>       #that first
>       IF(${Package}_INCLUDE_DIR)
[snip]
> cmake never enter in the second part because ITK_INCLUDE_DIR is defined,
> and so it doesn't include the ITK's use file.
[snip]
>> Gaëtan Lehmann wrote:
>>> Hi Luis,
>>> I've just commited a change in ITKConfig.cmake.in to fix the build
>>> of  the contributions to the Insight Journal.
>>> Defining ITK_INCLUDE_DIR was making them fail. I simply renamed it 
>>> ITK_MAIN_INCLUDE_DIR.
>>> You may want to review the changes though.

Where did all these extra variables come from?  It should be just
ITK_INCLUDE_DIRS and nothing else.  We don't want to expose any more
variables than necessary because someone will use them and then we have
to support them forever.

Luis, it looks like you added some extra complexity to make the file
relocatable.  I've done this already in VTK using another approach.
Please look at what I do for VTKConfig.cmake and adapt it for ITK.  I
can help you on Monday if you want.

Thanks,
-Brad


More information about the Insight-developers mailing list