[Insight-developers] ITK Module Questions / third party interdepencies
Williams, Norman K
norman-k-williams at uiowa.edu
Thu May 31 14:26:52 EDT 2012
I've pushed up a new version of my DCMTK patch here:
http://review.source.kitware.com/#/c/5989/
That puts the external project for DCMTK into a new Module
ITK/Modules/ThirdParty/DCMTK
I used ITK/Module/ThirdParty/VNL as a model; the main difference is the
sneaky stuff with building the ExternalProjects.
I added this to ITK/Modules/ThirdParty/CMakeLists.txt to force the
ITKDCMTK module to actually depend on the ExternalProject for DCMTK:
if(TARGET dcmtk)
add_dependencies(ITKDCMTK-all dcmtk)
endif()
I think something like this needs to be done, because otherwise I'm not
sure the ITKDCMTK module depends on the dcmtk ExternalProject at all. I
picked the ITKDCMTK-all target out of thin air -- I didn't know for sure
it exists as a target but it turns out that it does.
>> 2. how would I get the list of DCMTK libraries to be installed once
>>DCMTK
>> is built? Right now, the include directories, library list, and the lib
>> directory get suck into the proper lists, but in the case of actually
>> installing ITK, none of them would get added to the installation.
>>
> In itkExternal_DCMTK.cmake, you could add some install rules so that
>it could get installed right after building? Just my two cents.
I'm not sure about how to do this actually. At least not properly. There
are a lot of moving parts to CMake install stuff, and so far I've not had
to be very smart about it. Right now I'm having the DCMTK ExternalProject
install internally; I think you can use the DCMTK build in place, but I
don't trust the FindDCMTK.cmake that comes with CMake. I'd need an
install rule I guess that would pick up the installed headers and
libraries from the internal installation.
Or I could continue my sneaky ways, and add a post-install step that would
copy the headers & libs into the main ITK include/lib locations, such that
they'd get picked up by the regular ITK install commands.
--
Kent Williams norman-k-williams at uiowa.edu
On 5/31/12 12:30 PM, "Xiaoxiao Liu" <xiaoxiao.liu at kitware.com> wrote:
>Hi Kent, Please seem my comments below. Thanks!
>
>On Thu, May 31, 2012 at 1:07 PM, Williams, Norman K
><norman-k-williams at uiowa.edu> wrote:
>
>I've switched up how DCMTK gets built and deployed based on valuable
>feedback from Brad King & Bradley Lowencamp, who hereafter shall be
>referred to as The Two Brads, or just T2B.
>
>As a proof of concept -- or until someone tells me it's just a horrible
>idea -- instead of hacking the DCMTK build stuff into the top-level ITK
>directory, I'm trying out a different solution: I'm adding
>ITK/Modules/ThirdParty/DCMTK, and putting all the ExternalProject stuff in
>there.
>
>Why am I doing this?
>
>1. If I hypnotise CMake into thinking there's an ITK Module there, then I
>can have ITKIODCMTK depend on ITKDCMTK.
>2. It cleans up the top level CMakeLists.txt and doesn't stink up
>ITK/CMake
>
>
>
>>> I think it's a good idea to be consistent with other third party
>>>libraries in ITK.
>
>
>
>The questions I have right now:
>
>1. If I move all the external project implementation into
>ITK/Modules/ThirdParty/DCMTK, I don't know how to make the Module (I.e.
>the ITKDCMTK Module) depend on running the ExternalProject build for
>DCMTK. Which is to say, if the ExternalProject macro call is there in
>ITK/Modules/ThirdParty/DCMTK/CMakeList, DCMTK will get built eventually,
>but I'm not sure that the chain of dependency is there such that it will
>get built before the ITKIODCMTK module.
>
>
>
>>> I don't think there will be a problem. As long as the correct
>>>dependencies are specified in ITKIODCMTK (namely, it depends on
>>>ITKDCMTK), its depending modules will be built before itself.
>
>
>
>2. how would I get the list of DCMTK libraries to be installed once DCMTK
>is built? Right now, the include directories, library list, and the lib
>directory get suck into the proper lists, but in the case of actually
>installing ITK, none of them would get added to the installation.
>
>
>
>>> In itkExternal_DCMTK.cmake, you could add some install rules so that
>>>it could get installed right after building? Just my two cents.
>
>
>
>3. Is this even a good idea?
>
>
>
>>>I think so.
> In ITKBridgeOpenCV and ITKBridgeVXL modules, they rely on system
>installed OpenCV and VXL libraires. We didn't put in any super build
>mechanism for them yet. But if you claim a big sucess with this one,
>I think it would be an example to follow.
>
>
>
>________________________________
>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 <http://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
>
>
>
>
>
>
>--
>
>
>---------------------------------------------
>Xiaoxiao Liu, Ph.D.R & D Engineer
>Kitware Inc <http://www.kitware.com/>.
>
>Clifton Park, NYPhone: (518) 881-4924 or (518) 371-3971 x124
>
>
>
>
>
>
>
________________________________
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