]> Creatis software - crea.git/blob - appli/creaNewProject/NewProject/CMakeLists.txt.in
b6d9e919347710d06a4e54c5257706030b021426
[crea.git] / appli / creaNewProject / NewProject / CMakeLists.txt.in
1
2 # ---------------------------------------------------------------------
3 #
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
5 #                        pour la Santé)
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 #
10 #  This software is governed by the CeCILL-B license under French law and 
11 #  abiding by the rules of distribution of free software. You can  use, 
12 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
13 #  license as circulated by CEA, CNRS and INRIA at the following URL 
14 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
15 #  or in the file LICENSE.txt.
16 #
17 #  As a counterpart to the access to the source code and  rights to copy,
18 #  modify and redistribute granted by the license, users are provided only
19 #  with a limited warranty  and the software's author,  the holder of the
20 #  economic rights,  and the successive licensors  have only  limited
21 #  liability. 
22 #
23 #  The fact that you are presently reading this means that you have had
24 #  knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ 
26 */ 
27
28 # ---------------------------------
29 #
30 # Unless you are an experimented cmake user,
31 # have a look at :
32 # http://www.creatis.insa-lyon.fr/site/fr/CreatoosGettingStarted-v2.0.X
33 # before starting.
34 #
35 # Generated with creaNewProject, version of : 18/03/2010
36 # ---------------------------------
37
38 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
39
40 #MARK_AS_ADVANCED( FORCE CMAKE_BACKWARDS_COMPATIBILITY )
41
42 # for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003")
43 IF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
44   CMAKE_POLICY(SET CMP0003 NEW)
45   CMAKE_POLICY(SET CMP0005 NEW)
46   CMAKE_POLICY(SET CMP0011 NEW)
47 ENDIF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
48
49
50 ###################################
51 PROJECT( PROJECT_NAME )
52 ###################################
53
54 #==================================
55 # The project version
56 SET(PROJECT_MAJOR_VERSION 1)
57 SET(PROJECT_MINOR_VERSION 0)
58 SET(PROJECT_BUILD_VERSION 0)
59
60 SET(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_BUILD_VERSION}")
61 SET(PROJECT_VERSION_DATE "11/02/2010")
62 #ADD_DEFINITIONS( -DPROJECT_VERSION=${PROJECT_VERSION} )
63 #ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} )
64
65 # JPR 4 mars 2011
66 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
67
68 #==================================
69 SET(CREA_VERBOSE_CMAKE TRUE)
70 #==================================
71 # Find crea (mandatory, to use macros)
72 FIND_PACKAGE(crea REQUIRED)
73 IF (crea_FOUND)
74   INCLUDE(${crea_USE_FILE})
75 ENDIF(crea_FOUND)
76 #==================================
77
78 # USER! : Add here as many 'FIND_PACKAGE' blocks as *your* aplication requires
79 # -----
80
81 # WARNING : we are talking here about 'bbtk packages', not about libraries!
82 # if your project just requires the GDCM library, and not bbtk/packages/gdcm, 
83 # do not add FIND_PACKAGE(gdcm REQUIRED).
84 # Just set USE_GDCM to ON, after " Libraries/tools used
85
86
87 #==================================
88 # Do not allow to build inside the source tree
89 CREA_PREVENT_IN_SOURCE_BUILD()
90 #==================================
91
92 #==================================
93 # Libraries/tools used
94
95 # USER! : Note : Set USE_CREA to ON
96 # -----
97
98 #  if you need to LINK against crea
99 #  (and not only use its macros)
100 SET(USE_CREA      OFF)
101
102 SET(USE_GDCM      OFF)
103 SET(USE_GDCM_VTK  OFF)
104 SET(USE_GDCM2     OFF)
105 SET(USE_WXWIDGETS OFF)
106 SET(USE_KWWIDGETS OFF)
107 SET(USE_VTK       ON)
108 SET(USE_ITK       ON)
109 SET(USE_BOOST     OFF)
110
111 #==================================
112
113 #==================================
114
115 #FIND_PACKAGE(xxx REQUIRED)
116 #IF (xxx_FOUND)
117 #  INCLUDE(${xxx_USE_FILE})
118 #ENDIF(xxx_FOUND)
119
120 #==================================
121
122 #==================================
123 # USER! : Note : Set USE_DOXYGEN to ON
124 #  if you think you will ask, some day,
125 #  for Doxygen generation
126 #EED SET(USE_DOXYGEN   OFF)
127
128 # Note : Set USE_LATEX to ON, USE_TTH to ON
129 #  if you think you will ask, some day,
130 #  for doc generation using your own latex documents
131 #EED SET(USE_LATEX     OFF)
132 #EED SET(USE_TTH       OFF)
133
134 CREA_FIND_AND_USE_LIBRARIES()
135 #==================================
136
137 #==================================
138 # Where to put executables and libs
139 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
140 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
141 MARK_AS_ADVANCED(
142   CMAKE_BACKWARDS_COMPATIBILITY
143   EXECUTABLE_OUTPUT_PATH
144   LIBRARY_OUTPUT_PATH
145   )
146 #==================================
147
148 IF(WIN32)
149   INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
150   LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
151 ENDIF(WIN32)
152
153 #================================== 
154
155 #==================================
156
157   SET(LIBNAME $(PROJECT_NAME))
158   
159   INCLUDE_DIRECTORIES(
160     ${PROJECT_BINARY_DIR}
161   )
162   
163  # USER! : Add here the directories holding the .h you need 
164  
165  # INCLUDE_DIRECTORIES(appli/_YOUR_OWN_APPLI_SOURCE_DIRECTORY_)  
166  # INCLUDE_DIRECTORIES(lib/_YOUR_OWN_LIBRARY_SOURCE_DIRECTORY_)  
167
168 #==================================
169
170
171 #----------------------------------------------------------------------------
172 INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UserRootCMakeLists.cmake)
173
174 #==================================
175 # Where to generate documentation
176
177 SET(BBTK_DOC_BUILD_PATH 
178      ${PROJECT_BINARY_DIR}/doc
179    )
180 #==================================
181 # USER! : Hands off!
182 # ----
183
184 # ADD SUB DIRECTORIES
185 # ----------------
186 ADD_SUBDIRECTORY(lib)
187 ADD_SUBDIRECTORY(appli)
188 ADD_SUBDIRECTORY(doc)
189 ADD_SUBDIRECTORY(data)
190 ADD_SUBDIRECTORY(install)
191 #==================================
192
193 #-----------------------------------
194 # This one is just a sample.
195 # USER : you may comment out this line
196 # ----
197
198 ADD_SUBDIRECTORY(bbtk_mySamplePackage_PKG)
199
200 #==================================
201 # This one is the default empty package,
202 # created with the same name than the Project.
203 # USER : you may use it
204 # ----