CMakeLists.txt:5的CMake错误(find_package)

时间:2018-06-25 18:22:01

标签: c++ cmake vtk

CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "FindVTK.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "VTK", but
  CMake did not find one.

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

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.


Configuring incomplete, errors occurred!

CMakeLists.txt

cmake_minimum_required(VERSION 2.8)

PROJECT(Sphere)

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

add_executable(Sphere MACOSX_BUNDLE Sphere.cxx)

if(VTK_LIBRARIES)
  target_link_libraries(Sphere ${VTK_LIBRARIES})
else()
  target_link_libraries(Sphere vtkHybrid vtkWidgets)
endif()

0 个答案:

没有答案