[Insight-developers] ITK modularization & linking against sub-sets

Hauke Heibel hauke.heibel at googlemail.com
Thu Apr 7 09:01:25 EDT 2011


Hi,

first of all I would like to thank you guys for the modularization
effort. It looks really great and with the new configuration setup I
am even able to set a debug postfix for ITK while it is possible to
link against both versions without modifying
"ITKLibraryDepends.cmake".

Now to my question. I am wondering whether it is possible to search
for a sub-set of libraries. As an example, it used to be possible to
link against ITKIO only, in which case all dependencies were defined
in ITKIO_LIB_DEPENDS and properly used. I could actually define

target_link_libraries(<TARGET> debug ITKIOd release ITKIO)

I tried to modify the find_package call to

find_package(ITK REQUIRED COMPONENTS ITK-IO-Base)

but ${ITK_LIBRARIES} still contained all defined modules.

Is there any trick which I could use? If yes, is there a trick to
search for all IO libraries? Like using wildcards when specifying
components during find_package calls.

I am looking forward to any hints.

Kind regards,
Hauke


More information about the Insight-developers mailing list