Traced down the linker errors with GDCM 2.015+ and ITK 3.2:
- ITK CMakeLists.txt does a (line 811): FIND_PACKAGE(GDCM) IF(GDCM_FOUND) INCLUDE(${GDCM_USE_FILE})
- However, variables that should then be defined are empty (GDCM_LIBRARY_DIRS, GDCM_LIBRARIES...)
- Workaround:
- Set ITK_GDCM_LIBRARIES manually (line 831, 833):
SET(ITK_GDCM_LIBRARIES gdcmMSFF gdcmDICT gdcmIOD gdcmexpat gdcmDSED gdcmCommon gdcmzlib gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 gdcmopenjpeg gdcmcharls itkjpeg8)
- Add library directory manually (835):
LINK_DIRECTORIES(${GDCM_DIR}/bin)
--> ITK compiles fine with all GDCM versions.
(Similar to MITK after setting the link directory)
Question is whether:
a) Implement workaround
b) Further look on why FINDPACKE/INCLUDE of GDCM fails (first compare showed no result)