[Debian-med-packaging] Bug#600677: including UseGDCM.cmake sets VTK_VERSION, breaks ITK build

Steve M. Robbins smr at debian.org
Tue Oct 19 03:03:38 UTC 2010


Package: libgdcm2-dev
Version: 2.0.16-2
Severity: normal

The ITK CMakeLists.txt contains the following to support
system GDCM:

  IF(ITK_USE_SYSTEM_GDCM)
    FIND_PACKAGE(GDCM)
    IF(GDCM_FOUND)
      INCLUDE(${GDCM_USE_FILE})

where ${GDCM_USE_FILE} is /usr/lib/gdcm-2.0/UseGDCM.cmake
That file, in turn, contains the following:

  # Use VTK.
  IF(GDCM_USE_VTK)
    SET(VTK_DIR ${GDCM_VTK_DIR})
    FIND_PACKAGE(VTK)
    IF(VTK_FOUND)
      INCLUDE(${VTK_USE_FILE})
    ELSE(VTK_FOUND)
      MESSAGE("VTK not found in GDCM_VTK_DIR=\"${GDCM_VTK_DIR}\".")
    ENDIF(VTK_FOUND)
  ENDIF(GDCM_USE_VTK)

After this is executed, the variable VTK_VERSION is set, which causes
a problem later on in the ITK build because MetaIO is shared between
ITK and VTK and uses VTK_VERSION to decide when it is built in VTK
source tree.  See Utilities/MetaIO/CMakeLists.txt:

  IF(VTK_VERSION)
    SET(METAIO_FOR_VTK 1)
    MARK_AS_ADVANCED( METAIO_FOR_VTK )
    SET(METAIO_NAMESPACE "vtkmetaio")
  ELSE(VTK_VERSION)
    SET(METAIO_FOR_ITK 1)
    MARK_AS_ADVANCED( METAIO_FOR_ITK )
    SET(METAIO_NAMESPACE "ITKMetaIO")


Not sure what should be done.  On one hand, it was a complete
surprise that INCLUDE(${GDCM_USE_FILE}) set VTK_VERSION, and
that seems a bug to me.  On the other hand, the ITK build
should probably be more robust against this kind of thing, so
maybe MetaIO/CMakeLists.txt is at fault.

Suggestions?
-Steve


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libgdcm2-dev depends on:
ii  libgdcm2.0                    2.0.16-2   Grassroots DICOM runtime libraries

libgdcm2-dev recommends no packages.

libgdcm2-dev suggests no packages.

-- no debconf information





More information about the Debian-med-packaging mailing list