[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 15:30:19 EDT 2012


On 05/30/2012 03:13 PM, Williams, Norman K wrote:
> That would be OK if we were to always require and ExternalDCMTK.  It won't
> work if we want to optionally use ExternalProject to build DCMTK.  You can
> build an ExternalProject to pull in a library, if there's nothing that
> needs to be built before CMake configuration?

If the suggestion I made elsewhere in this thread doesn't work out,
you can at least include itkExternal_DCMTK.cmake from
Modules/IO/DCMTK/itk-module-init.cmake instead of modifying the
top-level CMakeLists.txt to include it.

To answer the original question, you need

  if(TARGET dcmtk)
    add_dependencies(ITKIODCMTK dcmtk)
  endif()

in Modules/IO/DCMTK/src/CMakeLists.txt to make sure the external
project builds before the library that needs it.

-Brad

> On 5/30/12 12:51 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
> 
>> Look in
>> Modules/Bridge/VtkGlue/itk-module-init.cmake
>>
>>
>> On Wed, May 30, 2012 at 1:46 PM, Williams, Norman K
>> <norman-k-williams at uiowa.edu> 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?
>>> --
>>> Kent Williams norman-k-williams at uiowa.edu
>>>
>>>
>>>
>>>
>>>
>>>
>>> ________________________________
>>> Notice: This UI Health Care e-mail (including attachments) is covered
>>> by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
>>> confidential and may be legally privileged.  If you are not the intended
>>> recipient, you are hereby notified that any retention, dissemination,
>>> distribution, or copying of this communication is strictly prohibited.
>>> Please reply to the sender that you have received the message in error,
>>> then delete it.  Thank you.
>>> ________________________________
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://kitware.com/products/protraining.php
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
> 
> 
> 
> ________________________________
> Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
> ________________________________
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list