]> Creatis software - clitk.git/blob - cmake/build_opt.cmake
Ensure the compilation with Qt4 and Qt5
[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     set(vv_QT_VERSION "4" CACHE STRING "Expected Qt version")
30     set_property(CACHE vv_QT_VERSION PROPERTY STRINGS 4 5)
31     if(NOT (vv_QT_VERSION VERSION_EQUAL "4" OR vv_QT_VERSION VERSION_EQUAL "5"))
32       message(FATAL_ERROR "Expected value for vv_QT_VERSION is either '4' or '5'")
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