CMake error when configuring itkvtkglue

人走茶凉 提交于 2019-12-08 04:07:40

问题


My question is similar to Emre's question. I am trying to build the itkImageToVTKImageFilter example from the wiki. I hope to use it for a Gaussian low pass filter that I plan to apply to an image. After I download the itkvtkglue, extract it to a folder, and then press configure in Cmake, I receive the following error message:

Check for working C compiler using: Visual Studio 9 2008
Check for working C compiler using: Visual Studio 9 2008 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 9 2008
Check for working CXX compiler using: Visual Studio 9 2008 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMake Error at F:/ITK/ItkVtkGlue/bin/UseItkVtkGlue.cmake:10 (include):
include could not find load file:

G:/VTK/UseVTK.cmake
Call Stack (most recent call first):
  CMakeLists.txt:13 (include)


Configuring incomplete, errors occurred!

I was not sure what could be causing the error but I suspected that it had something to do with my Windows system path. However, it also seems to be pointing to the correct folder (PATH goes to F: drive). The error indicates that Cmake is looking within G: drive for some unknown reason.

Here is the CMakeLists.txt for itkImageToVTKImageFilter:

cmake_minimum_required(VERSION 2.8)

project(DiscreteGaussianImageFilter)

find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
if (ITKVtkGlue_LOADED)
  find_package(VTK REQUIRED)
  include(${VTK_USE_FILE})
else()
  find_package(ItkVtkGlue REQUIRED)
  include(${ItkVtkGlue_USE_FILE})
  set(Glue ItkVtkGlue)
endif()

add_executable(DiscreteGaussianImageFilter MACOSX_BUNDLE DiscreteGaussianImageFilter.cxx)
target_link_libraries(DiscreteGaussianImageFilter
  ${Glue}  ${VTK_LIBRARIES} ${ITK_LIBRARIES})

I read that this was a very common problem but I am unsure how to correct it. Any help would be greatly appreciated! I am still very new to Stackoverflow so let me know if I need to provide more info.


回答1:


Works now. I needed to rebuild ITK with ITK_BUILD_ALL_MODULES on as well as checking the Module_ITKVtkGlue which I didn't do before.



来源:https://stackoverflow.com/questions/16429640/cmake-error-when-configuring-itkvtkglue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!