mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: runTimePostProcessing - updated CMakeLists.txt for cmake > 3
This commit is contained in:
@ -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)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user