IF(ITK_FOUND)
INCLUDE("${ITK_USE_FILE}")
ELSE(ITK_FOUND)
- MESSAGE(FATAL_ERROR
- "Cannot build without ITK. Please set ITK_DIR.")
+ MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
ENDIF(ITK_FOUND)
#=========================================================
ENDIF (CLITK_GENGETOPT STREQUAL "CLITK_GENGETOPT-NOTFOUND")
#=========================================================
+#=========================================================
+# Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library
+FIND_PROGRAM(LIBSTATGRAB NAMES statgrab PATHS)
+IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+ MESSAGE("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
+ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+#=========================================================
+
#=========================================================
# Building in the source tree is forbidden
IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
OPTION(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
OPTION(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF)
OPTION(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
-OPTION(CLITK_MEMORY_INFO "Enable memory information" OFF)
OPTION(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
IF (CLITK_BUILD_VV)
### Declare clitkCommon library
ADD_LIBRARY(clitkCommon STATIC ${clitkCommon_SRC})
-### if LIBSTATGRAB is installed, add clitkMemoryUsage.cxx in the library
-IF(CLITK_MEMORY_INFO)
- FIND_PROGRAM(LIBSTATGRAB NAMES statgrab PATHS)
- IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
- MESSAGE( FATAL_ERROR "libstatgrab NOT FOUND -> please install http://www.i-scream.org/libstatgrab/")
- ELSE (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
- TARGET_LINK_LIBRARIES(clitkCommon statgrab)
- ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
-ENDIF(CLITK_MEMORY_INFO)
+IF(NOT ${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+ TARGET_LINK_LIBRARIES(clitkCommon statgrab)
+ENDIF(NOT ${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
TARGET_LINK_LIBRARIES(clitkCommon vtkCommon vtkImaging vtkHybrid ITKBasicFilters)