0
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()
Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
  • what have you tried, and what is your question – Trevor Tracy Jun 25 '18 at 18:24
  • i have this error when trying to create example using cmake"Error in configuration process, project files may be invalid " CMake Error at CMakeLists.txt:6 (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. – Salma Ferchichi Jun 25 '18 at 18:29
  • You need to do what the error message tells you. – drescherjm Jun 25 '18 at 18:43
  • @SalmaFerchichi: Without additional information your question is no more than any of other questions with the same error message: https://www.google.ru/search?q=By+not+providing+"FindVTK.cmake"+site:stackoverflow.com. – Tsyvarev Jun 25 '18 at 19:04
  • 2
    Possible duplicate of [CMake could not find the VTKConfig.cmake](https://stackoverflow.com/questions/28467230/cmake-could-not-find-the-vtkconfig-cmake) – Tsyvarev Jun 25 '18 at 19:05
  • Have you installed vtk ? Or built it yourself ? – Mathieu Westphal Jul 09 '18 at 02:42

0 Answers0