CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-IF(POLICY CMP0020)
- CMAKE_POLICY(SET CMP0020 NEW)
-ENDIF(POLICY CMP0020)
+## ============
+## = Policies =
+## ============
+
+SET(
+ policies
+ CMP0020
+ CMP0042
+ )
+FOREACH(policy ${policies})
+ IF(POLICY ${policy})
+ CMAKE_POLICY(SET ${policy} NEW)
+ ENDIF(POLICY ${policy})
+ENDFOREACH(policy)
## ================
## = Project name =
## = Packages =
## ============
+# Prepare header to build shared libs (windows)
INCLUDE(GenerateExportHeader)
+# Find ITK and VTK
FIND_PACKAGE(ITK REQUIRED)
-INCLUDE(${ITK_USE_FILE})
-
FIND_PACKAGE(VTK REQUIRED)
+
+INCLUDE(${ITK_USE_FILE})
INCLUDE(${VTK_USE_FILE})
+# Do not use itk-vtk glue --> problems ahead!!!
IF(ITKVtkGlue_LOADED)
MESSAGE(FATAL_ERROR "ITKVtkGlue module is available. Please re-compile your ITK without it. It could lead to nasty compilation problems... Just waiting for Kitware to solve it.")
ENDIF(ITKVtkGlue_LOADED)