Skip to content

Commit

Permalink
BUG: Add VTK_VERSION for older VTK versions
Browse files Browse the repository at this point in the history
For older VTK's, VTK_VERSION is not defined. It needs to be setup manually.

See ITK-3304

Change-Id: I5efec656190e7417c7a2cbfa1b27b8b545261ca0
  • Loading branch information
iMichka authored and thewtex committed Aug 8, 2014
1 parent ccb3f41 commit 1f41404
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Modules/Bridge/VtkGlue/itk-module-init.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
#
# Find the packages required by this module
#
find_package(VTK REQUIRED)

# Needed VTK version
set(VERSION_MIN "5.9.20110419")

# Look for VTK
find_package(VTK REQUIRED)

# Older versions of VTK (VTK 5.5 for example) do not have VTK_VERSION, in this
# case it needs to be defined manually
if(NOT VTK_VERSION)
set(VTK_VERSION "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
endif()

if (${VTK_VERSION} VERSION_LESS ${VERSION_MIN})
message(ERROR " VtkGlue requires VTK version ${VERSION_MIN} or newer but the current version is ${VTK_VERSION}")
endif()
Expand Down

0 comments on commit 1f41404

Please sign in to comment.