]> Creatis software - bbtkGEditor.git/blob - CMakeLists.txt
Bug #1878
[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 # The project version
40 SET(PROJECT_MAJOR_VERSION 1)
41 SET(PROJECT_MINOR_VERSION 2)
42 SET(PROJECT_BUILD_VERSION 0)
43
44 SET(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_BUILD_VERSION}")
45 SET(PROJECT_VERSION_DATE "30/09/2009")
46 #ADD_DEFINITIONS( -DPROJECT_VERSION=${PROJECT_VERSION} )
47 #ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} )
48
49 #==================================
50
51 # JPR 4 mars 2011
52 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
53
54 #==================================
55 # Find crea (mandatory, to use macros)
56 SET(CREA_VERBOSE_CMAKE TRUE)
57 FIND_PACKAGE(crea REQUIRED)
58 IF (crea_FOUND)
59   INCLUDE(${crea_USE_FILE})
60 ENDIF(crea_FOUND)
61 #==================================
62
63
64 #==================================
65 # Do not allow to build inside the source tree
66 CREA_PREVENT_IN_SOURCE_BUILD()
67 #==================================
68
69 #==================================
70 # Libraries/tools used
71
72 # Note : Set USE_CREA to ON
73 #  if you need to LINK against crea
74 #  (and not only use its macros)
75 SET(USE_CREA      OFF)
76
77 SET(USE_GDCM      OFF)
78 SET(USE_GDCM_VTK  OFF)
79 SET(USE_GDCM2     OFF)
80 SET(USE_WXWIDGETS ON)
81 SET(USE_KWWIDGETS OFF)
82 SET(USE_VTK       ON)
83 SET(USE_ITK       OFF)
84 SET(USE_BOOST     ON)
85
86 # Note : Set USE_DOXYGEN to ON
87 #  if you think you will ask, some day, 
88 #  for Doxygen generation
89 #EED SET(USE_DOXYGEN   OFF)
90
91 # Note : Set USE_LATEX to ON, USE_TTH to ON
92 #  if you think you will ask, some day, 
93 #  for doc generation using your own latex documents
94 #EED SET(USE_LATEX     OFF)
95 #EED SET(USE_TTH       OFF)
96
97 CREA_FIND_AND_USE_LIBRARIES()
98 #==================================
99
100
101 #==================================
102 FIND_PACKAGE(creaMaracasVisu REQUIRED)
103 IF (creaMaracasVisu_FOUND)
104   INCLUDE(${creaMaracasVisu_USE_FILE})
105 ENDIF(creaMaracasVisu_FOUND)
106 #==================================
107
108 #==================================
109 # Find and use the Black Box Toolkit
110 # Search BBTK
111 FIND_PACKAGE(BBTK REQUIRED)
112 MARK_AS_ADVANCED(BBTK_DIR)
113 # If bbtk found
114 IF(BBTK_FOUND)
115   INCLUDE(${BBTK_USE_FILE})
116 ENDIF(BBTK_FOUND)
117 #==================================
118
119
120 #==================================
121 # Where to put executables and libs
122 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
123 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
124 MARK_AS_ADVANCED(
125   CMAKE_BACKWARDS_COMPATIBILITY
126   EXECUTABLE_OUTPUT_PATH
127   LIBRARY_OUTPUT_PATH
128   )
129   
130 #==================================
131
132   SET(LIBNAME $(bbtkGEditor))
133   INCLUDE_DIRECTORIES(
134     ${PROJECT_BINARY_DIR}
135
136  # USER! : Add here the directories holding the .h you need  
137     
138  #   ${PROJECT_SOURCE_DIR}/lib/_YOUR_OWN_LIBRARY_SOURCE_DIRECTORY_
139  
140     )
141 #==================================
142
143
144 #----------------------------------------------------------------------------
145 INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UserRootCMakeLists.cmake)
146
147 #==================================
148 # Where to generate documentation
149 # (desperate try; JPR)
150
151 SET(BBTK_DOC_BUILD_PATH 
152      ${PROJECT_BINARY_DIR}/doc
153    )
154 #==================================
155
156 # ADD_SUBDIRECTORY
157 ADD_SUBDIRECTORY(lib)
158 ADD_SUBDIRECTORY(appli)
159 ADD_SUBDIRECTORY(doc)
160 ADD_SUBDIRECTORY(data)
161 ADD_SUBDIRECTORY(install)
162 #==================================