]> Creatis software - clitk.git/blob - cmake/build_opt.cmake
502a05656364deaaa86b02eef2642a134b1c42d8
[clitk.git] / cmake / build_opt.cmake
1 #=========================================================
2 #Support for the CTest dashboard testing system
3 option(BUILD_TESTING "Build the testing tree" OFF)
4 if(BUILD_TESTING)
5   option(CLITK_BUILD_TESTING "Test ITK" ON)
6   include(CTest)
7 endif(BUILD_TESTING)
8 #=========================================================
9
10
11 #=========================================================
12 # If the user choose to build documentation, then search for Doxygen executables.
13 option(BUILD_DOXYGEN "Build Doxygen Documentation" OFF)
14 if(BUILD_DOXYGEN)
15   find_package(Doxygen)
16   add_subdirectory(${CLITK_SOURCE_DIR}/Doxygen ${PROJECT_BINARY_DIR}/Doxygen)
17 endif(BUILD_DOXYGEN)
18 #=========================================================
19
20 # Compilation options
21 option(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF)
22 mark_as_advanced(CLITK_EXPERIMENTAL)
23 option(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
24 option(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF)
25 option(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
26
27 option(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
28
29 if(CLITK_BUILD_VV)
30  if(VTK_VERSION VERSION_LESS 6.0.0)
31     set(vv_QT_VERSION "4" CACHE INTERNAL "Expected Qt version")
32  else()
33     set(vv_QT_VERSION "5" CACHE INTERNAL "Expected Qt version")
34  endif()
35
36   add_subdirectory(${CLITK_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv)
37 endif(CLITK_BUILD_VV)
38
39 #=========================================================
40 # Build test when vv has been compiled
41 if(BUILD_TESTING)
42   add_subdirectory(${CLITK_SOURCE_DIR}/tests ${PROJECT_BINARY_DIR}/tests)
43 endif(BUILD_TESTING)
44
45