[Insight-developers] [Insight-users] CMake config problem: ITK + GDCM 2 + VTK

Stephen Aylward stephen.aylward at kitware.com
Sat Jul 17 13:16:30 EDT 2010


Yeah - that's probably it.

I could add a AND NOT GDCM_USE_VTK to the VTK_VERSION test in the
MetaIO CMakeLists.txt file..ugly ugly ugly.

I'd rather GDCM didn't export VTK's variables, but I guess it is
necessary if the libraries it exports now depend on VTK.  However, if
GDCM_USE_VTK only creates apps within GDCM 2 that depend on VTK, and
its libraries never depend on VTK, then GDCM should be fixed.

Other ideas?

s

On Sat, Jul 17, 2010 at 12:26 PM, Karthik Krishnan
<karthik.krishnan at kitware.com> wrote:
> I think the more likely place VTK-VERSION may be getting pulled in is
> that GDCM has been built with the flag GDCM-USE-VTK set to ON. Dean
> Inglis who initially reported the error on the attached link did have
> this flag on.
>
> On 7/17/10, Stephen Aylward <stephen.aylward at kitware.com> wrote:
>> The problem is that VTK_VERSION is being set somewhere that it shouldn't
>>
>> Bill H thinks VTK_VERSION might be set in GDCM.   Check the Cache/Use
>> file on your local install.
>>
>> I checked the following in ITK:
>>
>> $ grep -R VTK_VERSION *
>> Utilities/MetaIO/CMakeLists.txt:IF(VTK_VERSION)
>> Utilities/MetaIO/CMakeLists.txt:ELSE(VTK_VERSION)
>> Utilities/MetaIO/CMakeLists.txt:ENDIF(VTK_VERSION)
>> Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/CMakeLists.txt:
>> SET(VTK_VERSION
>> "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
>> Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/CMakeLists.txt:
>> IF("${VTK_VERSION}" STRLESS "${MIN_ITK_VER}")
>> Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/CMakeLists.txt:
>> ELSE("${VTK_VERSION}" STRLESS "${MIN_ITK_VER}")
>> Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/CMakeLists.txt:
>> ENDIF("${VTK_VERSION}" STRLESS "${MIN_ITK_VER}")
>>
>> So, if WrapITK is being used, then a temp var called VTK_VERSION is
>> being created...which is kind of a "reserved" CMake variable and could
>> cause the error.  Is wrapping enabled?
>>
>> s
>>
>> On Sat, Jul 17, 2010 at 10:35 AM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>>> Hmmm... that happened to me too.
>>>
>>> Why haven't we fixed this?
>>>
>>> Bill
>>>
>>> On Sat, Jul 17, 2010 at 8:47 AM, Karthik Krishnan
>>> <karthik.krishnan at kitware.com> wrote:
>>>> Known issue.. See this
>>>>
>>>>   http://www.itk.org/pipermail/insight-users/2010-June/037360.html
>>>>
>>>> and
>>>>
>>>>   http://www.itk.org/pipermail/insight-users/2010-July/037404.html
>>>>
>>>> I think the consensus is to downgrade to CMake 2.6 from Cmake 2.8
>>>>
>>>>
>>>> On Sat, Jul 17, 2010 at 3:25 PM, Roger Bramon Feixas
>>>> <rogerbramon at gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>> I have the same problem reported in this
>>>>> thread: http://www.itk.org/pipermail/insight-users/2010-March/035903.html,
>>>>> but any solution was published. I would like to continue the discussion.
>>>>> I'm trying to compile ITK 3.18 with GDCM 2.0.15. I compiled correctly
>>>>> GDCM
>>>>> 2.0.15 with VTK 5.6 but when I set to 1 the ITK_USE_SYSTEM_GDCM option
>>>>> this
>>>>> CMake message error appears:
>>>>> CMake Error at Utilities/MetaIO/CMakeLists.txt:104 (INSTALL):
>>>>>   install TARGETS given no LIBRARY DESTINATION for shared library target
>>>>>   "vtkmetaio".
>>>>>
>>>>> In the mentioned thread, Brad King proposed a test:
>>>>> "
>>>>> Edit ITK/Utilities/MetaIO/CMakeLists.txt to add some message()-s
>>>>> in this top block:
>>>>> IF(VTK_VERSION)
>>>>>   SET(METAIO_FOR_VTK 1)
>>>>>   MARK_AS_ADVANCED( METAIO_FOR_VTK )
>>>>>   SET(METAIO_NAMESPACE "vtkmetaio")
>>>>>   MESSAGE(FATAL_ERRORO "ITK IS NOT VTK!")  # ADD THIS LINE
>>>>> ELSE(VTK_VERSION)
>>>>> ...
>>>>> ENDIF(VTK_VERSION)
>>>>> Does CMake hit this?  Are you pointing ITK at a VTK? "
>>>>> I tested it, and yes, CMake hits this.
>>>>> Anyone have any suggestion?
>>>>> Thanks,
>>>>> Roger
>>>>> _____________________________________
>>>>> 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://www.kitware.com/products/protraining.html
>>>>>
>>>>> 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-users
>>>>>
>>>>
>>>>
>>>> _____________________________________
>>>> 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://www.kitware.com/products/protraining.html
>>>>
>>>> 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-users
>>>>
>>>>
>>> _______________________________________________
>>> 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.html
>>>
>>> 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
>>>
>>
>>
>>
>> --
>>
>> ==============================
>> Stephen R. Aylward, Ph.D.
>> Director of Medical Imaging Research
>> Kitware, Inc. - North Carolina Office
>> http://www.kitware.com
>> stephen.aylward (Skype)
>> (919) 969-6990 x300
>>
>



-- 

==============================
Stephen R. Aylward, Ph.D.
Director of Medical Imaging Research
Kitware, Inc. - North Carolina Office
http://www.kitware.com
stephen.aylward (Skype)
(919) 969-6990 x300


More information about the Insight-developers mailing list