]> Creatis software - clitk.git/blobdiff - cmake/dependencies.cmake
Median Filter + some bug corrections in Resample Image Filter
[clitk.git] / cmake / dependencies.cmake
index e8bbb3e9059d661bf9bf5143c62e18046f2e2a84..7b389c246203d2ac0601a59045184739ffef363e 100644 (file)
@@ -23,9 +23,14 @@ IF(VTK_FOUND)
       vtkWidgets
       vtkImaging
       vtkHybrid
-      QVTK
       )
   ENDIF(VTK_VERSION VERSION_LESS 5.8.0)
+  IF(VTK_VERSION VERSION_LESS 5.6.0)
+    SET ( VTK_LIBRARIES
+      ${VTK_LIBRARIES}
+      vtkQVTK
+    )
+  ENDIF(VTK_VERSION VERSION_LESS 5.6.0)
 ELSE(VTK_FOUND)
   MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
 ENDIF(VTK_FOUND)
@@ -39,11 +44,32 @@ FIND_PACKAGE(Gengetopt)
 
 #=========================================================
 # Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library
-FIND_LIBRARY(LIBSTATGRAB NAMES statgrab PATHS)
-IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+IF (NOT DEFINED CLITK_MEMORY_INFO OR CLITK_MEMORY_INFO)
+  FIND_LIBRARY(LIBSTATGRAB NAMES statgrab PATHS)
+  IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
 #  MESSAGE("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
-  SET(CLITK_MEMORY_INFO OFF)
-ELSE (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
-  SET(CLITK_MEMORY_INFO ON)
-ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")  
+    SET(CLITK_MEMORY_INFO OFF)
+  ELSE (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+    SET(CLITK_MEMORY_INFO ON)
+  ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")  
+ENDIF()
 #=========================================================
+
+
+#=========================================================
+### Check if ITK was compiled with SYSTEM_GDCM = ON
+SET(CLITK_USE_SYSTEM_GDCM FALSE)
+IF(ITK_VERSION_MAJOR LESS "4")
+  IF(ITK_USE_SYSTEM_GDCM)
+    SET(CLITK_USE_SYSTEM_GDCM TRUE) 
+  ENDIF(ITK_USE_SYSTEM_GDCM)
+ELSE(ITK_VERSION_MAJOR LESS "4")
+  SET(GDCM_INCLUDE_INSTALL ".*include/gdcm-.*")
+  SET(GDCM_INCLUDE_BUILD ".*/Source/MediaStorageAndFileFormat")
+  IF(NOT ITKGDCM_INCLUDE_DIRS MATCHES ${GDCM_INCLUDE_BUILD})
+    SET(CLITK_USE_SYSTEM_GDCM TRUE)
+  ENDIF()
+ENDIF(ITK_VERSION_MAJOR LESS "4")
+SET(CLITK_USE_SYSTEM_GDCM FALSE)
+#DD(CLITK_USE_SYSTEM_GDCM)
+