]> Creatis software - bbtkGEditor.git/blob - CMakeLists.txt
#3084 bbGEditor Bug New Normal - Color refresh for inputs and outputs
[bbtkGEditor.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 #
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.
13 #
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
18 #  liability. 
19 #
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 # ------------------------------------------------------------------------ */  
23
24 # ---------------------------------
25 #
26 # Unless you are an experimented cmake user,
27 # have a look at :
28 # http://www.creatis.insa-lyon.fr/site/fr/CreatoosGettingStarted-v2.0.X
29 # before starting.
30 #
31 # ---------------------------------
32
33 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
34 ###################################
35 PROJECT( bbtkGEditor )
36 ###################################
37
38 #-----------------------------------------------------------------------------
39 # Configure Dart testing support.  This should be done before any
40 # MESSAGE(FATAL_ERROR ...) commands are invoked.
41 IF(INCLUDE_CTEST)
42   INCLUDE(CTest)
43   ENABLE_TESTING()
44 ENDIF(INCLUDE_CTEST)
45 IF(BUILD_TESTING)
46   SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
47   MARK_AS_ADVANCED(BUILDNAME)
48 ENDIF(BUILD_TESTING)
49 #-----------------------------------------------------------------------------
50
51 #==================================
52 # The project version
53 SET(PROJECT_MAJOR_VERSION 1)
54 SET(PROJECT_MINOR_VERSION 2)
55 SET(PROJECT_BUILD_VERSION 0)
56
57 SET(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_BUILD_VERSION}")
58 SET(PROJECT_VERSION_DATE "30/09/2009")
59 #ADD_DEFINITIONS( -DPROJECT_VERSION=${PROJECT_VERSION} )
60 #ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} )
61
62 #==================================
63
64 # JPR 4 mars 2011
65 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
66
67 #==================================
68 # Find crea (mandatory, to use macros)
69 SET(CREA_VERBOSE_CMAKE TRUE)
70 FIND_PACKAGE(crea REQUIRED)
71 IF (crea_FOUND)
72   INCLUDE(${crea_USE_FILE})
73 ENDIF(crea_FOUND)
74 #==================================
75
76
77 #==================================
78 # Do not allow to build inside the source tree
79 CREA_PREVENT_IN_SOURCE_BUILD()
80 #==================================
81
82 #==================================
83 # Libraries/tools used
84
85 # Note : Set USE_CREA to ON
86 #  if you need to LINK against crea
87 #  (and not only use its macros)
88 SET(USE_CREA      OFF)
89
90 SET(USE_GDCM      OFF)
91 SET(USE_GDCM_VTK  OFF)
92 SET(USE_GDCM2     OFF)
93 SET(USE_WXWIDGETS ON)
94 SET(USE_KWWIDGETS OFF)
95 SET(USE_VTK       ON)
96 SET(USE_ITK       OFF)
97 SET(USE_BOOST     ON)
98
99 # Note : Set USE_DOXYGEN to ON
100 #  if you think you will ask, some day, 
101 #  for Doxygen generation
102 #EED SET(USE_DOXYGEN   OFF)
103
104 # Note : Set USE_LATEX to ON, USE_TTH to ON
105 #  if you think you will ask, some day, 
106 #  for doc generation using your own latex documents
107 #EED SET(USE_LATEX     OFF)
108 #EED SET(USE_TTH       OFF)
109
110 CREA_FIND_AND_USE_LIBRARIES()
111 #==================================
112
113
114 #==================================
115 FIND_PACKAGE(creaMaracasVisu REQUIRED)
116 IF (creaMaracasVisu_FOUND)
117   INCLUDE(${creaMaracasVisu_USE_FILE})
118 ENDIF(creaMaracasVisu_FOUND)
119 #==================================
120
121 #==================================
122 # Find and use the Black Box Toolkit
123 # Search BBTK
124 FIND_PACKAGE(BBTK REQUIRED)
125 MARK_AS_ADVANCED(BBTK_DIR)
126 # If bbtk found
127 IF(BBTK_FOUND)
128   INCLUDE(${BBTK_USE_FILE})
129 ENDIF(BBTK_FOUND)
130 #==================================
131
132
133 #==================================
134 # Where to put executables and libs
135 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
136 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
137 MARK_AS_ADVANCED(
138   CMAKE_BACKWARDS_COMPATIBILITY
139   EXECUTABLE_OUTPUT_PATH
140   LIBRARY_OUTPUT_PATH
141   )
142   
143 #==================================
144
145   SET(LIBNAME $(bbtkGEditor))
146   INCLUDE_DIRECTORIES(
147     ${PROJECT_BINARY_DIR}
148
149  # USER! : Add here the directories holding the .h you need  
150     
151  #   ${PROJECT_SOURCE_DIR}/lib/_YOUR_OWN_LIBRARY_SOURCE_DIRECTORY_
152  
153     )
154 #==================================
155
156
157 #----------------------------------------------------------------------------
158 INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UserRootCMakeLists.cmake)
159
160 #==================================
161 # Where to generate documentation
162 # (desperate try; JPR)
163
164 SET(BBTK_DOC_BUILD_PATH 
165      ${PROJECT_BINARY_DIR}/doc
166    )
167 #==================================
168
169 # ADD_SUBDIRECTORY
170 ADD_SUBDIRECTORY(lib)
171 ADD_SUBDIRECTORY(appli)
172 ADD_SUBDIRECTORY(doc)
173 ADD_SUBDIRECTORY(data)
174 ADD_SUBDIRECTORY(install)
175 #==================================