-INCLUDE_DIRECTORIES(itk filters ${PROJECT_BINARY_DIR})
-
-# Select what is compiled
-ADD_SUBDIRECTORY(common)
-ADD_SUBDIRECTORY(filters)
-
-# Compilation options
-OPTION(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF)
-
-OPTION(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
-IF (CLITK_BUILD_VV)
- add_subdirectory(vv)
-ENDIF(CLITK_BUILD_VV)
-
-OPTION(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
-IF (CLITK_BUILD_TOOLS)
- add_subdirectory(tools)
-ENDIF(CLITK_BUILD_TOOLS)
-
-OPTION(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
-IF (CLITK_BUILD_REGISTRATION)
- add_subdirectory(registration)
-ENDIF(CLITK_BUILD_REGISTRATION)
-
-#OPTION(CLITK_BUILD_SEGMENTATION "Build segmentation tools" OFF)
-#IF (CLITK_BUILD_SEGMENTATION)
-# add_subdirectory(segmentation)
-#ENDIF (CLITK_BUILD_SEGMENTATION)
+INCLUDE(${CLITK_SOURCE_DIR}/cmake/common.cmake)
+INCLUDE(${CLITK_SOURCE_DIR}/cmake/dependencies.cmake)
+INCLUDE(${CLITK_SOURCE_DIR}/cmake/build_opt.cmake)
+#=========================================================