使用GDCM配置的ITK的Cmake错误

时间:2012-12-22 09:14:54

标签: cmake itk gdcm

使用GDCM2.2配置ITK时发现以下错误

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)

我已安装GDCM2.2 [not repository]并手动设置gdcm目录的路径,但仍然是Cmake返回的此错误。 请帮忙。

1 个答案:

答案 0 :(得分:2)

使用gdcm下载.zip文件构建ITK gdcm2.2.1或最新版本导致安装gdcm by exe不包含任何GDCMconfig.cmake文件但zip包含它。在ITK配置中,我们必须提供GDCMconfig.cmake所在目录的路径。