[ITK] No GDCMConfig.cmake
Matt McCormick
matt.mccormick at kitware.com
Tue Feb 24 11:10:08 EST 2015
Hi Nigel,
Yes, it appears the transitive propagation could be improved. If you
would like to submit a patch [1], the GDCM CMakeLists.txt [2] could be
improved by adding the ITKGDCM_EXPORT_CODE_BUILD and
ITKGDCM_EXPORT_CODE_INSTALL variables when ITK_USE_SYSTEM_GDCM is ON,
a la the ITKVtkGlue module [3]. These will include calls to
find_package(GDCM).
Otherwise, MyLib will need to call find_package(GDCM).
Thanks,
Matt
[1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html
[2] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/ThirdParty/GDCM/CMakeLists.txt;h=ff23c9cb65b1e81e48c65d342cf5185a76c791b6;hb=HEAD
[3] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Bridge/VtkGlue/CMakeLists.txt;h=111a6c758f3384679c84749b1141dc403ad637d7;hb=HEAD
On Tue, Feb 24, 2015 at 10:33 AM, Nigel Mcfarlane
<Nigel.Mcfarlane at beds.ac.uk> wrote:
> Hi Matt,
> Thank you for confirming that for me. I have built ITK with an external GDCM library, but there is one odd thing:
> My test app (ITK/VTK/Qt only) sits on top of a library structure like this:
>
> GDCM --> ITK --> MyLib --> App
>
> Now App can't link because it doesn't know where to find gdcmDICT.lib. It looks as if ITK's link to GDCM is not passed up the build chain, ie it is not "transitive". Do I now have to add explicit GDCM library paths to builds which link to ITK?
>
> Regards
> Nigel
>
>
>
>
>
>
>> -----Original Message-----
>> From: Matt McCormick [mailto:matt.mccormick at kitware.com]
>> Sent: 23 February 2015 18:27
>> To: Nigel Mcfarlane
>> Cc: community at itk.org
>> Subject: Re: [ITK] No GDCMConfig.cmake
>>
>> Hi Nigel,
>>
>> Yes, ITK's internal GDCM is not intended to be used by other libraries.
>>
>> To have a shared version of GDCM, build GDCM outside of ITK, perhaps
>> using the MITK build of GDCM, then point ITK to this version of GDCM by
>> setting ITK_USE_SYSTEM_GDCM to ON, and pointing CMake to your GDCM
>> build.
>>
>> HTH,
>> Matt
>>
>> On Mon, Feb 23, 2015 at 12:18 PM, Nigel Mcfarlane
>> <Nigel.Mcfarlane at beds.ac.uk> wrote:
>> > I am using ITK 4.5.2 and I have found that GDCMConfig.cmake is not built.
>> > This means that there is no handle by which an external library can
>> > find and use ITK’s version of GDCM.
>> >
>> >
>> >
>> > My problem is that I’m trying to build MITK, which includes both ITK
>> > and GDCM as third-party libraries. If I point MITK’s superbuild at
>> > the existing ITK on my system, I get a version clash between ITK’s
>> > GDCM and the one downloaded by MITK. I was intending to solve this by
>> > pointing MITK at the GDCM in ITK, but it seems that ITK does not
>> > export its copy of GDCM for external use.
>> >
>> >
>> >
>> > The line which would have created it is:
>> >
>> > C:\ITK\InsightToolkit-
>> 4.5.2\Modules\ThirdParty\GDCM\src\gdcm\CMakeList
>> > s.txt
>> >
>> > #SUBDIRS(CMake/ExportConfiguration)
>> >
>> >
>> >
>> > This has been deliberately commented out to prevent the export of
>> > GDCM. Is there a reason for this, such as the library being altered,
>> > patched or incomplete?
>> >
>> >
>> >
>> > Thank you
>> >
>> > Nigel McFarlane
>> >
>> > University of Bedfordshire, UK
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Community mailing list
>> > Community at itk.org
>> > http://public.kitware.com/mailman/listinfo/community
>> >
More information about the Community
mailing list