]> Creatis software - creaContours.git/blob - CMakeLists.txt
#3161 creaContours Bug New Normal - Interpolate Image - Color and Threshold Layer...
[creaContours.git] / CMakeLists.txt
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26 # ---------------------------------
27 #
28 # Unless you are an experimented cmake user,
29 # have a look at :
30 # http://www.creatis.insa-lyon.fr/site/fr/CreatoosGettingStarted-v2.0.X
31 # before starting.
32 #---------------------------------
33
34 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
35 #MARK_AS_ADVANCED( FORCE CMAKE_BACKWARDS_COMPATIBILITY )
36
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)
43
44 PROJECT(creaContours)
45
46 #-----------------------------------------------------------------------------
47 # Configure Dart testing support.  This should be done before any
48 # MESSAGE(FATAL_ERROR ...) commands are invoked.
49 IF(INCLUDE_CTEST)
50   INCLUDE(CTest)
51   ENABLE_TESTING()
52 ENDIF(INCLUDE_CTEST)
53 IF(BUILD_TESTING)
54   SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
55   MARK_AS_ADVANCED(BUILDNAME)
56 ENDIF(BUILD_TESTING)
57 #-----------------------------------------------------------------------------
58
59 SET(PROJECT_MAJOR_VERSION 1)
60 SET(PROJECT_MINOR_VERSION 3)
61 SET(PROJECT_BUILD_VERSION 0)
62
63 #==================================
64
65 # JPR 4 mars 2011
66 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
67
68 #==================================
69 # Find crea (mandatory, to use macros)
70 SET(CREA_VERBOSE_CMAKE TRUE)
71
72 FIND_PACKAGE(crea REQUIRED)
73 IF (crea_FOUND)
74   INCLUDE(${crea_USE_FILE})
75 ENDIF(crea_FOUND)
76
77
78 SET(USE_GDCM      OFF)
79 SET(USE_GDCM_VTK  OFF)
80 SET(USE_WXWIDGETS ON)
81 SET(USE_VTK       ON)
82 SET(USE_ITK       ON)
83 SET(USE_BOOST     ON)
84 SET(USE_XERCES    ON)
85
86 OPTION (${PROJECT_NAME}_DOC "${PROJECT_NAME}_DOC" OFF)
87
88 CREA_FIND_AND_USE_LIBRARIES()
89
90
91 FIND_PACKAGE(creaEnvironment REQUIRED)
92 IF (creaEnvironment_FOUND)
93   INCLUDE(${creaEnvironment_USE_FILE})
94 ENDIF(creaEnvironment_FOUND)
95
96 FIND_PACKAGE(creaMaracasVisu REQUIRED)
97 IF (creaMaracasVisu_FOUND)
98   INCLUDE(${creaMaracasVisu_USE_FILE})
99 ENDIF(creaMaracasVisu_FOUND)
100
101 FIND_PACKAGE(creaImageIO REQUIRED)
102 IF (creaImageIO_FOUND)
103   INCLUDE(${creaImageIO_USE_FILE})
104 ENDIF(creaImageIO_FOUND)
105
106
107
108
109
110 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
111 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
112 MARK_AS_ADVANCED(
113   CMAKE_BACKWARDS_COMPATIBILITY
114   EXECUTABLE_OUTPUT_PATH 
115   LIBRARY_OUTPUT_PATH
116   )
117   
118 #IF(WIN32)
119 #    INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
120 #    LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
121 #ENDIF(WIN32)
122
123 IF(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)
128    ELSE()
129       MESSAGE(FATAL_ERROR "System variable SQLITE_DIR not defined")
130    ENDIF()
131 ENDIF(WIN32)
132
133
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)
138
139 ADD_SUBDIRECTORY(lib)
140 ADD_SUBDIRECTORY(appli)
141 ADD_SUBDIRECTORY(bbtk)
142 ADD_SUBDIRECTORY(data)
143 ADD_SUBDIRECTORY(install)