-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
171 lines (135 loc) · 4.71 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# ---------------------------------
#
# Unless you are an experimented cmake user,
# have a look at :
# http://www.creatis.insa-lyon.fr/site/fr/CreatoosGettingStarted-v2.0.X
# before starting.
#
# Generated with creaNewProject, version of : 18/03/2010
# ---------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
#MARK_AS_ADVANCED( FORCE CMAKE_BACKWARDS_COMPATIBILITY )
# for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003")
IF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
CMAKE_POLICY(SET CMP0003 NEW)
CMAKE_POLICY(SET CMP0005 NEW)
CMAKE_POLICY(SET CMP0011 NEW)
ENDIF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
###################################
PROJECT( creaTextureSynthesis )
###################################
#==================================
# The project version
SET(PROJECT_MAJOR_VERSION 1)
SET(PROJECT_MINOR_VERSION 0)
SET(PROJECT_BUILD_VERSION 0)
SET(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_BUILD_VERSION}")
SET(PROJECT_VERSION_DATE "11/02/2010")
#ADD_DEFINITIONS( -DPROJECT_VERSION=${PROJECT_VERSION} )
#ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} )
#==================================
# Find crea (mandatory, to use macros)
#==================================
# USER! : Add here as many 'FIND_PACKAGE' blocks as *your* aplication requires
#FIND_PACKAGE(xxx REQUIRED)
#IF (xxx_FOUND)
# INCLUDE(${xxx_USE_FILE})
#ENDIF(xxx_FOUND)
#==================================
# Do not allow to build inside the source tree
IF("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
MESSAGE(FATAL_ERROR "Building in the source tree is not allowed !! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' and build outside the sources")
ENDIF("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
#==================================
#==================================
# Libraries/tools used
# USER! : Note : Set USE_CREA to ON
# if you need to LINK against crea
# (and not only use its macros)
SET(USE_CREA OFF)
SET(USE_GDCM OFF)
SET(USE_GDCM_VTK OFF)
SET(USE_GDCM2 OFF)
SET(USE_WXWIDGETS OFF)
SET(USE_KWWIDGETS OFF)
SET(USE_VTK ON)
SET(USE_ITK ON)
SET(USE_BOOST OFF)
SET(USE_QT4 OFF)
#FIND_PACKAGE(creaMaracasVisu REQUIRED)
#IF(creaMaracasVisu_FOUND)
# INCLUDE(${creaMaracasVisu_USE_FILE})
#ENDIF(creaMaracasVisu_FOUND)
#FIND_PACKAGE(creaANN REQUIRED)
#IF(creaANN_FOUND)
# INCLUDE(${creaANN_USE_FILE})
#ENDIF(creaANN_FOUND)
FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)
FIND_PACKAGE(VTK REQUIRED)
IF(VTK_FOUND)
INCLUDE(${VTK_USE_FILE})
ENDIF(VTK_FOUND)
# USER! : Note : Set USE_DOXYGEN to ON
# if you think you will ask, some day,
# for Doxygen generation
#EED SET(USE_DOXYGEN OFF)
# Note : Set USE_LATEX to ON, USE_TTH to ON
# if you think you will ask, some day,
# for doc generation using your own latex documents
#EED SET(USE_LATEX OFF)
#EED SET(USE_TTH OFF)
INCLUDE(cmake/UserMacros.cmake)
#CREA_FIND_AND_USE_LIBRARIES()
#==================================
#==================================
# Where to put executables and libs
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
MARK_AS_ADVANCED(
CMAKE_BACKWARDS_COMPATIBILITY
EXECUTABLE_OUTPUT_PATH
LIBRARY_OUTPUT_PATH
)
#==================================
IF(WIN32)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32)
LINK_DIRECTORIES(${creaANN_DIR}/Debug)
LINK_DIRECTORIES(${creaANN_DIR}/Release)
ENDIF(WIN32)
#==================================
#==================================
SET(LIBNAME $(creaTextureSynthesis))
INCLUDE_DIRECTORIES(
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/lib/ann
${PROJECT_SOURCE_DIR}/lib/ann/ANN
${PROJECT_SOURCE_DIR}/lib/ITKPCA
${PROJECT_SOURCE_DIR}/lib/TextureSynthesis
${PROJECT_SOURCE_DIR}/lib/ITKFilters
${PROJECT_SOURCE_DIR}/lib/ITKANNConnector
#${PROJECT_SOURCE_DIR}/lib/ITKStats
#${creaANN_INCLUDE_DIRS}
)
# USER! : Add here the directories holding the .h you need
# INCLUDE_DIRECTORIES(appli/_YOUR_OWN_APPLI_SOURCE_DIRECTORY_)
# INCLUDE_DIRECTORIES(lib/_YOUR_OWN_LIBRARY_SOURCE_DIRECTORY_)
#==================================
#==================================
# Where to generate documentation
# (desperate try; JPR)
SET(BBTK_DOC_BUILD_PATH
${PROJECT_BINARY_DIR}/doc
)
#==================================
# USER! : Hands off!
# ADD_SUBDIRECTORY
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(appli)
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(data)
ADD_SUBDIRECTORY(install)
#==================================