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