-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcaret_qmake_include.pro.john
418 lines (365 loc) · 9.41 KB
/
caret_qmake_include.pro.john
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
#
# Compile debug on mac since that is where development is done
# Compile optimized on Linux and Windows
#
macx {
#
# Uncomment for Debug
#
#CONFIG -= release
#CONFIG += warn_on debug
#
# Uncomment for Release
#
CONFIG += release
CONFIG -= debug
#
# Suppress "has different visibility" and ALL warnings
#
QMAKE_LFLAGS_APP += -w
}
!macx {
CONFIG += release
CONFIG -= debug
}
CONFIG += qt thread
QT += network opengl xml
#QT += qt3support
QT -= qt3support
#
# when missing, it must be the GIFTI API library
#
DEFINES += CARET_FLAG
#=================================================================================
#
# Check for needed environment variables
#
!exists( $(VTK_INC_DIR)/vtkConfigure.h ) {
error("The environment variable for VTK includes \"VTK_INC_DIR\" not defined.")
}
!exists( $(QWT_INC_DIR)/qwt.h ) {
error("The environment variable for QWT includes \"QWT_INC_DIR\" not defined.")
}
!exists( $(QTDIR)/include/qt.h ) {
!exists( $(QTDIR)/include/Qt ) {
!exists( $(QTDIR)/include/qt4/qt.h ) {
!exists( $(QTDIR)/include/qt4/Qt ) {
error("The environment variable for QT \"QTDIR\" not defined.")
}
}
}
}
#=================================================================================
#
# if this file exists then QT4 is being used
#
exists( $(QTDIR)/include/Qt/qicon.h ) {
DEFINES += CARET_QT4
QT += network opengl xml
}
#=================================================================================
#
# enable for profile (performance) measurement
#
#QMAKE_CXXFLAGS_DEBUG += -pg
#QMAKE_LFLAGS_DEBUG += -pg
#QMAKE_CXXFLAGS_RELEASE += -pg
#QMAKE_LFLAGS_RELEASE += -pg
#=================================================================================
#
# OpenMP (www.openmp.org)
#
!win32 {
QMAKE_CXXFLAGS_DEBUG += -fopenmp
QMAKE_LFLAGS_DEBUG += -fopenmp
QMAKE_CXXFLAGS_RELEASE += -fopenmp
QMAKE_LFLAGS_RELEASE += -fopenmp
}
#=================================================================================
#
# Update include paths
#
INCLUDEPATH += $$(QWT_INC_DIR)
INCLUDEPATH += \
../caret_brain_set \
../caret_command_operations \
../caret_common \
../caret_statistics \
../caret_files \
../caret_uniformize \
../caret_widgets
DEPENDPATH += \
../caret_brain_set \
../caret_command_operations \
../caret_common \
../caret_statistics \
../caret_files \
../caret_uniformize \
../caret_widgets
#=================================================================================
#
# Is NetCDF/Minc available ?
#
exists( $(NETCDF_INC_DIR)/minc.h ) {
DEFINES += HAVE_MINC
INCLUDEPATH += $$(NETCDF_INC_DIR)
NETCDF_LIBS = -L$$(NETCDF_LIB_DIR) \
-lminc \
-lnetcdf
exists( $(NETCDF_LIB_DIR)/libminc2.a ) {
NETCDF_LIBS += -lminc2
}
exists( $(NETCDF_LIB_DIR)/libminc2.so ) {
NETCDF_LIBS += -lminc2
}
message( "Building with MINC support" )
}
#
# Is NetCDF/Minc NOT available
#
!exists( $(NETCDF_INC_DIR)/minc.h ) {
message( "Building WITHOUT MINC support" )
}
#==============================================================================
#
# VTK settings
#
INCLUDEPATH += $$(VTK_INC_DIR)
#
# have VTK compiler defines (primarily for GIFTI API)
#
DEFINES += HAVE_VTK
#
# VTK 5.x flag
#
DEFINES += HAVE_VTK5
message( "Building WITH VTK5 support" )
#
#
#
INCLUDEPATH += ../caret_vtk4_classes
#
# need by caret_vtk4_classes
#
INCLUDEPATH += $$(VTK_INC_DIR)/vtkmpeg2encode
#
# VTK Libraries for VTK 5.x
#
win32 {
#VTK_LIBS = ../caret_vtk4_classes/debug/libCaretVtk4Classes.a
}
!win32 {
VTK_LIBS = ../caret_vtk4_classes/libCaretVtk4Classes.a
}
VTK_LIBS += \
-L$$(VTK_LIB_DIR) \
-lvtkFiltering \
-lvtkGenericFiltering \
-lvtkImaging \
-lvtkGraphics \
-lvtkIO \
-lvtkFiltering \
-lvtkCommon \
-lvtksys \
-lvtkjpeg \
-lvtkpng \
-lvtkexpat \
-lvtkzlib
exists( $(VTK_INC_DIR)/vtkMPEG2Writer.h ) {
message( "Building WITH MPEG support" )
DEFINES += HAVE_MPEG
VTK_LIBS += -lvtkMPEG2Encode
}
#
# Check for VTK 4.x (does not have vtkMPEG2Writer.h)
#
#!exists( $(VTK_INC_DIR)/vtkMPEG2Writer.h ) {
# #
# # VTK Libraries for VTK 4.x
# #
# VTK_LIBS = -L$$(VTK_LIB_DIR) \
# -lvtkGraphics \
# -lvtkFiltering \
# -lvtkIO \
# -lvtkPatented \
# -lvtkImaging \
# -lvtkCommon \
# -lvtkGraphics \
# -lvtkFiltering \
# -lvtkIO \
# -lvtkPatented \
# -lvtkImaging \
# -lvtkCommon \
# -lvtkFiltering \
# -lvtkCommon \
# -lvtkjpeg \
# -lvtkpng \
# -lvtkexpat \
# -lvtkDICOMParser \
# -lvtksys
# !macx {
# VTK_LIBS += \
# -lvtkzlib
# }
#}
#==============================================================================
#
# Is Mesa Offscreen Rendering Available?
#
#exists ( $(OSMESA_INC_DIR)/GL/osmesa.h ) {
# DEFINES += HAVE_OSMESA
#
# OSMESA_INCLUDE_PATH = $$(OSMESA_INC_DIR)
# OSMESA_LIBS = -L$$(OSMESA_LIB_DIR) \
# -lOSMesa \
# -lGL \
# -lGLU \
# -lOSMesa
#
# message( "Offscreen Mesa Available" )
#}
#==============================================================================
#
# Is ITK available
#
#exists( $(ITK_INC_DIR)/itkConfigure.h ) {
# message( "Building with ITK support" )
exists( $(ITK_INC_DIR)/INTENTIONALLY_NO_VTK ) {
DEFINES += HAVE_ITK
INCLUDEPATH += \
$$(ITK_INC_DIR) \
$$(ITK_INC_DIR)/Algorithms \
$$(ITK_INC_DIR)/BasicFilters \
$$(ITK_INC_DIR)/Common \
$$(ITK_INC_DIR)/IO \
$$(ITK_INC_DIR)/Numerics \
$$(ITK_INC_DIR)/Numerics/Statistics \
$$(ITK_INC_DIR)/Patented \
$$(ITK_INC_DIR)/SpatialObject \
$$(ITK_INC_DIR)/Utilities/vxl/core \
$$(ITK_INC_DIR)/Utilities/vxl/vcl
ITK_LIBS = -L$$(ITK_LIB_DIR) \
-lITKBasicFilters \
-lITKStatistics \
-lITKNumerics \
-lITKCommon \
-litkvnl_inst \
-litkvnl_algo \
-litkvnl \
-litkvcl \
-litknetlib \
-litksys
}
#
# is ITK NOT available
#
!exists( $(ITK_INC_DIR)/itkConfigure.h ) {
message( "Building WITHOUT ITK support" )
}
#=================================================================================
#
# Windows unique stuff
#
win32 {
!exists( $(ZLIB_INC_DIR)/zlib.h ) {
error( "You must define ZLIB_INC_DIR to the ZLIB include files directory.")
}
CONFIG += rtti exceptions console
INCLUDEPATH += $$(ZLIB_INC_DIR)
## LIBS += -L$$(ZLIB_LIB_DIR) -lzlib
QMAKE_CXXFLAGS_RELEASE += -Wno-deprecated
QMAKE_CXXFLAGS_DEBUG += -Wno-deprecated
#
# QWT libraries
#
QWT_LIBS = -L$$(QWT_LIB_DIR) \
-lqwt
}
#=================================================================================
#
# Windows Speech API
#
#win32 {
# exists( $(SAPI_DIR)\Include\sapi.h ) {
# DEFINES += HAVE_MS_SPEECH
# INCLUDEPATH += $(SAPI_DIR)\Include
# LIBS += $(SAPI_DIR)\Lib\i386\sapi.lib
# }
#}
#=================================================================================
#
# Macintosh unique stuff
#
macx {
#
# Build objects for Universal binaries
#
#CONFIG += ppc x86
#QMAKE_CXXFLAGS_RELEASE += -Wno-deprecated \
# -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
#QMAKE_CXXFLAGS_DEBUG += -Wno-deprecated \
# -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
QMAKE_CXXFLAGS_RELEASE += -Wno-deprecated \
-isysroot /Developer/SDKs/MacOSX10.5.sdk
QMAKE_CXXFLAGS_DEBUG += -Wno-deprecated \
-isysroot /Developer/SDKs/MacOSX10.5.sdk
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
#
# Link for OSX 10.4
#
#QMAKE_LFLAGS_DEBUG += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
QMAKE_LFLAGS_RELEASE += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk
#QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
# Link for Intel
#QMAKE_LFLAGS_DEBUG += -arch i386
#QMAKE_LFLAGS_RELEASE += -arch i386
#
# Add Link PPC for universal binaries
#
#QMAKE_LFLAGS_DEBUG += -arch ppc
#QMAKE_LFLAGS_RELEASE += -arch ppc
#
# Universal binaries
# Note: universal binaries are very slow to link,
# so disable except when needed.
#
#QMAKE_LFLAGS_DEBUG += -arch i386 -arch ppc
#QMAKE_LFLAGS_RELEASE += -arch i386 -arch ppc
#
# 64 bit support
# Note that these flags are not sufficient to link
# May need to recompile VTK, QT, etc
#
#QMAKE_CXXFLAGS_RELEASE += -m64
#QMAKE_CXXFLAGS_DEBUG += -m64
#QMAKE_LFLAGS_DEBUG += -m64
#QMAKE_LFLAGS_RELEASE += -m64
# CONFIG -= release
# CONFIG += warn_on debug
#
# QWT libraries
#
QWT_LIBS = -L$$(QWT_LIB_DIR) \
-lqwt
}
#=================================================================================
#
# Unix (but not Mac) unique stuff
#
unix:!macx {
#
# QWT libraries
#
QWT_LIBS = -L$$(QWT_LIB_DIR) \
-lqwt
LIBS += \
-ltiff \
-ljpeg
QMAKE_CXXFLAGS_RELEASE += -Wno-deprecated
QMAKE_CXXFLAGS_DEBUG += -Wno-deprecated
#profiling
#QMAKE_CXXFLAGS_RELEASE += -pg
#QMAKE_CXXFLAGS_DEBUG += -pg
#QMAKE_LFLAGS_DEBUG += -pg
#QMAKE_LFLAGS_RELEASE += -pg
}