[Insight-developers] ITK Module Questions / third party interdepencies

Brad King brad.king at kitware.com
Thu May 31 14:51:40 EDT 2012


On 05/31/2012 02:43 PM, Williams, Norman K wrote:
>>  add_dependencies(ITKIODCMTK dcmtk)
> 
> It it more consistent to have ITKIODCMTK depend on ITKDCMTK.  As I stated
> in my last e-mail, I think I made that work by adding
>         add_dependencies(ITKDCMTK-all dcmtk)
> after the itk_module_impl() call.

AFAIK the ITKIODCMTK library does not depend on ITKDCMTK-all
so that won't help.

> The IMPORTED library thing is interesting;  I will read up on it.

http://www.cmake.org/Wiki/CMake/Tutorials/Exporting_and_Importing_Targets

> I'm not sure how well it will solve the deployment issues; we'll want the
> dcmtk libraries and headers to get installed alongside the regular ITK
> libraries.

Configure the external project so that the external build systems own
install rules will put things where ITK wants them.  Leave the install
step out of the ExternalProject_Add call.  Then use install(SCRIPT)
or install(CODE) along with execute_process to run the install rules
of the external build system directly during ITK's install step.

> As long as I'm getting all fancy, there's another thing I need to figure
> out: There are other libraries that DCMTK depends on that I'm building as
> external projects.
> 
> All of them besides ICONV are already getting built as ThirdParty Modules
> (TIFF,JPEG, and ZLIB), so it seems like a good idea to build DCMTK against
> them.  In that case, I'd have to make the DCMTK ExternalProject depend on
> them, so they get built first before the DCMTK-config step gets run.

That shouldn't be too hard with the proper add_dependencies calls
with the external project target as the first argument.

-Brad


More information about the Insight-developers mailing list