Search code examples
cmakeitkgdcm

Cmake Error for ITK with GDCM configuration


Following error found while configuring ITK with GDCM2.2

CMake Error at Modules/ThirdParty/GDCM/itk-module-init.cmake:5 (find_package):
  By not providing "FindGDCM.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "GDCM", but
  CMake did not find one.

  Could not find a package configuration file provided by "GDCM" with any of
  the following names:

    GDCMConfig.cmake
    gdcm-config.cmake

  Add the installation prefix of "GDCM" to CMAKE_PREFIX_PATH or set
  "GDCM_DIR" to a directory containing one of the above files.  If "GDCM"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:558 (include)

I have installed GDCM2.2 [not repository] and manually set path of gdcm directory but still this error returned by Cmake. Please help.


Solution

  • To build ITK with gdcm download .zip file of gdcm2.2.1 or latest version cause installing gdcm by exe is not include any GDCMconfig.cmake file but zip have it. And in ITK configuration we have to give path of directory where GDCMconfig.cmake is present.