[Insight-developers] ITK/CMake q: Can I make a module depend on an ExternalProject target?
Williams, Norman K
norman-k-williams at uiowa.edu
Thu May 31 10:00:03 EDT 2012
Thanks a lot -- this is the sort of information I need. I can see that
ITK's CMake Module based infrastructure has some snazzy features. Is it
documented on the WIKI somewhere?
On 5/30/12 2:30 PM, "Brad King" <brad.king at kitware.com> wrote:
>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
________________________________
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.
________________________________
More information about the Insight-developers
mailing list