1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # This software is governed by the CeCILL-B license under French law and
8 # abiding by the rules of distribution of free software. You can use,
9 # modify and/ or redistribute the software under the terms of the CeCILL-B
10 # license as circulated by CEA, CNRS and INRIA at the following URL
11 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
12 # or in the file LICENSE.txt.
14 # As a counterpart to the access to the source code and rights to copy,
15 # modify and redistribute granted by the license, users are provided only
16 # with a limited warranty and the software's author, the holder of the
17 # economic rights, and the successive licensors have only limited
20 # The fact that you are presently reading this means that you have had
21 # knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------ */
25 # ---------------------------------
27 # Unless you are an experimented cmake user,
29 # http://www.creatis.insa-lyon.fr/site/fr/CreatoosGettingStarted-v2.0.X
31 # ---------------------------------
33 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
36 INCLUDE(Version.cmake)
38 SET(CREA_LIBRARY_PROPERTIES ${CREA_LIBRARY_PROPERTIES}
39 VERSION "${crea_MAJOR_VERSION}.${crea_MINOR_VERSION}.${crea_BUILD_VERSION}"
40 SOVERSION "${crea_MAJOR_VERSION}.${crea_MINOR_VERSION}.${crea_BUILD_VERSION}"
43 SET(CREA_VERBOSE_CMAKE TRUE)
44 SET(CREA_CMAKE_REL_PATH cmake)
45 SET(CREA_CMAKE_DIR ${PROJECT_SOURCE_DIR}/${CREA_CMAKE_REL_PATH})
46 INCLUDE(${CREA_CMAKE_DIR}/CREACMakeSettings.cmake NO_POLICY_SCOPE)
47 INCLUDE(${CREA_CMAKE_DIR}/CREAMacros.cmake)
50 CREA_PREVENT_IN_SOURCE_BUILD()
53 OPTION(CREA_BUILD_VTK "Build crea with vtk ?" OFF)
56 SET(CREA_BUILT_WITH_VTK ON)
59 OPTION(CREA_BUILD_WX "Build crea with wxWidgets ?" OFF)
62 SET(CREA_BUILT_WITH_WX ON)
66 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
69 CREA_FIND_AND_USE_LIBRARIES()
70 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
71 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
72 SET(CREA_LIB_PATH ${CMAKE_CREA_LIB_PATH} )
75 CMAKE_BACKWARDS_COMPATIBILITY
76 EXECUTABLE_OUTPUT_PATH
80 SET (BOOST_FILESYSTEM_VERSION 2)
82 #-----------------------------------------------------------------------------
83 # messages compilation options
85 OPTION ( CREA_COMPILE_DEBUG_MESSAGES "Compile CREA debug messages ?" USE_DEBUG_LIB)
86 OPTION ( CREA_COMPILE_ERROR_MESSAGES "Compile CREA error messages ?" ON)
87 OPTION ( CREA_COMPILE_MESSAGES "Compile CREA messages ?" ON)
88 OPTION ( CREA_COMPILE_WARNING_MESSAGES "Compile CREA warning messages ?" ON)
89 #-----------------------------------------------------------------------------
91 INCLUDE(${CREA_CMAKE_DIR}/CREAResolveOptions.cmake)
93 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
94 INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/src)
97 INCLUDE_DIRECTORIES(/usr/lib/x86_64-linux-gnu/glib-2.0/include/)
100 ADD_SUBDIRECTORY(cmake)
101 ADD_SUBDIRECTORY(src)
102 ADD_SUBDIRECTORY(appli)
103 ADD_SUBDIRECTORY(lib)
104 #-----------------------------------------------------------------------------
105 OPTION( BUILD_SAMPLES "Build samples ?" OFF)
107 ADD_SUBDIRECTORY(samples)
109 #-----------------------------------------------------------------------------
111 ADD_SUBDIRECTORY(install)