1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 # ---------------------------------
28 # Unless you are an experimented cmake user,
30 # http://www.creatis.insa-lyon.fr/site/fr/CreatoosGettingStarted-v2.0.X
32 #---------------------------------
34 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
35 #MARK_AS_ADVANCED( FORCE CMAKE_BACKWARDS_COMPATIBILITY )
37 # for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003")
38 IF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
39 CMAKE_POLICY(SET CMP0003 NEW)
40 CMAKE_POLICY(SET CMP0005 NEW)
41 CMAKE_POLICY(SET CMP0011 NEW)
42 ENDIF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
46 #-----------------------------------------------------------------------------
47 # Configure Dart testing support. This should be done before any
48 # MESSAGE(FATAL_ERROR ...) commands are invoked.
54 SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
55 MARK_AS_ADVANCED(BUILDNAME)
57 #-----------------------------------------------------------------------------
59 SET(PROJECT_MAJOR_VERSION 1)
60 SET(PROJECT_MINOR_VERSION 3)
61 SET(PROJECT_BUILD_VERSION 0)
63 #==================================
66 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
68 #==================================
69 # Find crea (mandatory, to use macros)
70 SET(CREA_VERBOSE_CMAKE TRUE)
72 FIND_PACKAGE(crea REQUIRED)
74 INCLUDE(${crea_USE_FILE})
86 OPTION (${PROJECT_NAME}_DOC "${PROJECT_NAME}_DOC" OFF)
88 CREA_FIND_AND_USE_LIBRARIES()
91 FIND_PACKAGE(creaEnvironment REQUIRED)
92 IF (creaEnvironment_FOUND)
93 INCLUDE(${creaEnvironment_USE_FILE})
94 ENDIF(creaEnvironment_FOUND)
96 FIND_PACKAGE(creaMaracasVisu REQUIRED)
97 IF (creaMaracasVisu_FOUND)
98 INCLUDE(${creaMaracasVisu_USE_FILE})
99 ENDIF(creaMaracasVisu_FOUND)
101 FIND_PACKAGE(creaImageIO REQUIRED)
102 IF (creaImageIO_FOUND)
103 INCLUDE(${creaImageIO_USE_FILE})
104 ENDIF(creaImageIO_FOUND)
110 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
111 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
113 CMAKE_BACKWARDS_COMPATIBILITY
114 EXECUTABLE_OUTPUT_PATH
119 # INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
120 # LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
124 set (SQLITE_DIR $ENV{SQLITE_DIR})
125 IF(DEFINED SQLITE_DIR)
126 INCLUDE_DIRECTORIES(${SQLITE_DIR}/include)
127 LINK_DIRECTORIES(${SQLITE_DIR}/lib)
129 MESSAGE(FATAL_ERROR "System variable SQLITE_DIR not defined")
134 INCLUDE_DIRECTORIES(lib/Interface_ManagerContour_NDimensions)
135 INCLUDE_DIRECTORIES(lib/Interface_Icons_NDimensions)
136 INCLUDE_DIRECTORIES(lib/kernel_ManagerContour_NDimensions)
137 INCLUDE_DIRECTORIES(lib/kernel_ManagerContour_NDimensions/ParserOsirix)
139 ADD_SUBDIRECTORY(lib)
140 ADD_SUBDIRECTORY(appli)
141 ADD_SUBDIRECTORY(bbtk)
142 ADD_SUBDIRECTORY(data)
143 ADD_SUBDIRECTORY(install)