Skip to content
Snippets Groups Projects
Commit d293c95a authored by Rene Halver's avatar Rene Halver
Browse files

updated VTK package search in CMakeLists.txt

parent 7969a504
Branches
Tags
No related merge requests found
Pipeline #59278 passed
......@@ -72,6 +72,20 @@ find_dependency(MPI)\n"
if(CM_ALL_VTK_OUTPUT)
message("Using VTK output")
find_package(VTK)
if(NOT VTK_FOUND)
message(FATAL_ERROR "VTK not found, help CMake to find it by setting VTK_LIBRARY and VTK_INCLUDE_DIR")
else()
if (VTK_MAJOR_VERSION GREATER_EQUAL 9)
find_package(VTK REQUIRED COMPONENTS
CommonCore
CommonDataModel
FiltersProgrammable
IOParallelXML
IOXML
ParallelMPI
)
else()
find_package(VTK REQUIRED COMPONENTS
vtkCommonCore
vtkCommonDataModel
......@@ -80,8 +94,7 @@ if(CM_ALL_VTK_OUTPUT)
vtkIOXML
vtkParallelMPI
)
if(NOT VTK_FOUND)
message(FATAL_ERROR "VTK not found, help CMake to find it by setting VTK_LIBRARY and VTK_INCLUDE_DIR")
endif()
endif()
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/Config.cmake.in "find_dependency(VTK)\n")
endif(CM_ALL_VTK_OUTPUT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment