]> Creatis software - clitk.git/blobdiff - cmake/dependencies.cmake
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
[clitk.git] / cmake / dependencies.cmake
index 078c5a4de21d50e1839019a5e469c3bf8789d4f6..4396d093127c0ee6016ff35c72a67ff288097d85 100644 (file)
@@ -25,6 +25,12 @@ IF(VTK_FOUND)
       vtkHybrid
       )
   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)
@@ -38,11 +44,13 @@ 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()
 #=========================================================