Skip to content
Snippets Groups Projects
Commit 7b23ac75 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: runTimePostProcessing - updated CMakeLists.txt for cmake > 3

parent 0483f8c4
No related merge requests found
......@@ -2,22 +2,26 @@ cmake_minimum_required(VERSION 2.8)
project(runTimePostProcessing)
if (EXISTS $ENV{VTK_DIR})
# Set policy for CMP0002 needed for cmake > 3
cmake_policy(SET CMP0002 OLD)
if (EXISTS "$ENV{VTK_DIR}")
message("Building with VTK from $ENV{VTK_DIR}")
find_package(VTK REQUIRED HINTS $ENV{VTK_DIR})
include(${VTK_USE_FILE})
else (EXISTS $ENV{ParaView_DIR})
elseif (EXISTS "$ENV{ParaView_DIR}")
message("Building with Paraview from $ENV{ParaView_DIR}")
find_package(ParaView REQUIRED)
include(${VTK_USE_FILE})
set(
VTK_VERSION
"${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}"
)
endif (EXISTS $ENV{VTK_DIR})
else ()
message (FATAL_ERROR "VTK not found using VTK_DIR or ParaView_DIR")
endif ()
include(CMakeLists-Common.txt)
#-----------------------------------------------------------------------------
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment