]> Creatis software - creaContours.git/blob - CMakeLists.txt
dddf791c9e5e908d6652963a90ff1ff17824bdc7
[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 SET(PROJECT_MAJOR_VERSION 1)
47 SET(PROJECT_MINOR_VERSION 3)
48 SET(PROJECT_BUILD_VERSION 0)
49
50 #==================================
51
52 # JPR 4 mars 2011
53 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
54
55 #==================================
56 # Find crea (mandatory, to use macros)
57 SET(CREA_VERBOSE_CMAKE TRUE)
58
59 FIND_PACKAGE(crea REQUIRED)
60 IF (crea_FOUND)
61   INCLUDE(${crea_USE_FILE})
62 ENDIF(crea_FOUND)
63
64
65 SET(USE_GDCM      OFF)
66 SET(USE_GDCM_VTK  OFF)
67 SET(USE_WXWIDGETS ON)
68 SET(USE_VTK       ON)
69 SET(USE_ITK       ON)
70 SET(USE_BOOST     ON)
71 SET(USE_XERCES    ON)
72
73 OPTION (${PROJECT_NAME}_DOC "${PROJECT_NAME}_DOC" OFF)
74
75 CREA_FIND_AND_USE_LIBRARIES()
76
77
78 FIND_PACKAGE(creaEnvironment REQUIRED)
79 IF (creaEnvironment_FOUND)
80   INCLUDE(${creaEnvironment_USE_FILE})
81 ENDIF(creaEnvironment_FOUND)
82
83 FIND_PACKAGE(creaMaracasVisu REQUIRED)
84 IF (creaMaracasVisu_FOUND)
85   INCLUDE(${creaMaracasVisu_USE_FILE})
86 ENDIF(creaMaracasVisu_FOUND)
87
88 FIND_PACKAGE(creaImageIO REQUIRED)
89 IF (creaImageIO_FOUND)
90   INCLUDE(${creaImageIO_USE_FILE})
91 ENDIF(creaImageIO_FOUND)
92
93
94
95
96
97 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
98 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
99 MARK_AS_ADVANCED(
100   CMAKE_BACKWARDS_COMPATIBILITY
101   EXECUTABLE_OUTPUT_PATH 
102   LIBRARY_OUTPUT_PATH
103   )
104   
105 IF(WIN32)
106     INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
107     LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
108 ENDIF(WIN32)
109
110
111 INCLUDE_DIRECTORIES(lib/Interface_ManagerContour_NDimensions)
112 INCLUDE_DIRECTORIES(lib/Interface_Icons_NDimensions)
113 INCLUDE_DIRECTORIES(lib/kernel_ManagerContour_NDimensions)
114 INCLUDE_DIRECTORIES(lib/kernel_ManagerContour_NDimensions/ParserOsirix)
115
116 ADD_SUBDIRECTORY(lib)
117 ADD_SUBDIRECTORY(appli)
118 ADD_SUBDIRECTORY(bbtk)
119 ADD_SUBDIRECTORY(data)
120 ADD_SUBDIRECTORY(install)