]> Creatis software - FrontAlgorithms.git/blobdiff - CMakeLists.txt
Now ported to macosx and easier to configure on win32... hopefully
[FrontAlgorithms.git] / CMakeLists.txt
index 2ada831c810ec82b4d9a722f1a2e2efb8ea8232a..7bb3e2abef638149d8f1a6158155e4f1869578ea 100644 (file)
@@ -1,8 +1,19 @@
 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 =
@@ -31,14 +42,17 @@ ENDIF(BUILD_SHARED_LIBS)
 ## = 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)