Skip to content
Snippets Groups Projects
Commit 6e7bf7a2 authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin
Browse files

STYLE: Add "Display VTK version" section to top-level CMakeLists

Note that testing for VTK_BINARY_DIR or Module_WikiExamples are equivalent
since both evaluate to True when building the module from within VTK.


Former-commit-id: 1bee9a59
parent e1ea1dc9
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,15 @@ else()
message(STATUS "${_msg} - no")
endif()
# Display VTK version
if(NOT VTK_BINARY_DIR)
find_package(VTK REQUIRED)
endif()
if(NOT VTK_RENDERING_BACKEND)
set(VTK_RENDERING_BACKEND OpenGL) # Support VTK version prior to introduction of rendering backend
endif()
message(STATUS "VTKWikiExamples: VTK VERSION: ${VTK_VERSION}(${VTK_RENDERING_BACKEND})")
if(Module_WikiExamples)
#
# This is a VTK remote module build
......@@ -42,18 +51,10 @@ else()
# This is a stand-alone build
#
# See if VTK is using OpenGL or OpenGL2
find_package(VTK CONFIG)
if (NOT VTK_RENDERING_BACKEND)
set(VTK_RENDERING_BACKEND OpenGL)
endif()
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
endif()
message(STATUS "VTKWikiExamples: VTK VERSION: ${VTK_VERSION}(${VTK_RENDERING_BACKEND})")
set(CMAKE_MODULE_PATH ${WikiExamples_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
#-----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment