[Insight-developers] ITK/CMake q: Can I make a module depend on an ExternalProject target?

Brad King brad.king at kitware.com
Wed May 30 13:53:42 EDT 2012


On 05/30/2012 01:46 PM, Williams, Norman K wrote:
> So I've posted a gerrit topic on the work I've done to integrate
> DCMTKImageIO: http://review.source.kitware.com/#/c/5989/
> 
> The question I have is that DCMTK needs to be built before compiling
> ITK/Modules/IO/DCMTK.  Is there some way to make the module depend on the
> DCMTK external project, something like the way the inter-module
> dependencies work?

Don't bring the external project in at the top-level.  Put it
Modules/ThirdParty/DCMTK and make it a module.  The module
implementation can provide the ITK_USE_SYSTEM_DCMTK option.
Look at Modules/ThirdParty/VNL or one of the other third-party
modules to see how it works.  You shouldn't need to touch the
top-level CMakeLists.txt at all.

-Brad


More information about the Insight-developers mailing list