]> Creatis software - clitk.git/blob - cmake/build_opt.cmake
28294019837d4736ef427e5dc06a2c7a7cb3cf49
[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 option(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
23 option(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF)
24 option(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
25
26 option(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
27
28 if(CLITK_BUILD_VV)
29  if(VTK_VERSION VERSION_LESS 6.0.0)
30     set(vv_QT_VERSION "4" CACHE INTERNAL "Expected Qt version")
31  else()
32     set(vv_QT_VERSION "5" CACHE INTERNAL "Expected Qt version")
33  endif()
34
35   add_subdirectory(${CLITK_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv)
36 endif(CLITK_BUILD_VV)
37
38 #=========================================================
39 # Build test when vv has been compiled
40 if(BUILD_TESTING)
41   add_subdirectory(${CLITK_SOURCE_DIR}/tests ${PROJECT_BINARY_DIR}/tests)
42 endif(BUILD_TESTING)
43
44