forked from openscad/openscad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openscad.pro
314 lines (279 loc) · 7.61 KB
/
openscad.pro
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
# Environment variables which can be set to specify library locations:
# MPIRDIR
# MPFRDIR
# BOOSTDIR
# CGALDIR
# EIGEN2DIR
# GLEWDIR
# OPENCSGDIR
# OPENSCAD_LIBRARIES
#
# Please see the 'Buildling' sections of the OpenSCAD user manual
# for updated tips & workarounds.
#
# http://en.wikibooks.org/wiki/OpenSCAD_User_Manual
isEmpty(QT_VERSION) {
error("Please use qmake for Qt 4 (probably qmake-qt4)")
}
# Auto-include config_<variant>.pri if the VARIANT variable is give on the
# command-line, e.g. qmake VARIANT=mybuild
!isEmpty(VARIANT) {
message("Variant: $${VARIANT}")
exists(config_$${VARIANT}.pri) {
message("Including config_$${VARIANT}.pri")
include(config_$${VARIANT}.pri)
}
}
# Populate VERSION, VERSION_YEAR, VERSION_MONTH, VERSION_DATE from system date
include(version.pri)
# for debugging link problems (use nmake -f Makefile.Release > log.txt)
win32 {
# QMAKE_LFLAGS += -VERBOSE
}
debug: DEFINES += DEBUG
TEMPLATE = app
INCLUDEPATH += src
# Handle custom library location.
# Used when manually installing 3rd party libraries
OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES)
!isEmpty(OPENSCAD_LIBDIR) {
QMAKE_INCDIR_QT = $$OPENSCAD_LIBDIR/include $$QMAKE_INCDIR_QT
QMAKE_LIBDIR = $$OPENSCAD_LIBDIR/lib $$QMAKE_LIBDIR
}
else {
macx {
# Default to MacPorts on Mac OS X
QMAKE_INCDIR = /opt/local/include
QMAKE_LIBDIR = /opt/local/lib
}
}
macx {
# add CONFIG+=deploy to the qmake command-line to make a deployment build
deploy {
message("Building deployment version")
CONFIG += x86 x86_64
}
TARGET = OpenSCAD
ICON = icons/OpenSCAD.icns
QMAKE_INFO_PLIST = Info.plist
APP_RESOURCES.path = Contents/Resources
APP_RESOURCES.files = OpenSCAD.sdef
QMAKE_BUNDLE_DATA += APP_RESOURCES
LIBS += -framework Carbon
}
else {
TARGET = openscad
}
win32 {
RC_FILE = openscad_win32.rc
}
CONFIG += qt
QT += opengl
# see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
# and https://github.com/openscad/openscad/pull/119
# ( QT += opengl does not automatically link glu on some DSO systems. )
unix:!macx {
!contains ( QMAKE_LIBS_OPENGL, "-lGLU" ) {
QMAKE_LIBS_OPENGL += -lGLU
}
}
netbsd* {
LIBS += -L/usr/X11R7/lib
QMAKE_LFLAGS += -Wl,-R/usr/X11R7/lib
QMAKE_LFLAGS += -Wl,-R/usr/pkg/lib
!isEmpty(OPENSCAD_LIBDIR) {
QMAKE_LFLAGS += -Wl,-R$$OPENSCAD_LIBDIR/lib
}
}
# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
*g++* {
QMAKE_CXXFLAGS *= -fno-strict-aliasing
}
CONFIG(mingw-cross-env) {
include(mingw-cross-env.pri)
}
# Application configuration
macx:CONFIG += mdi
CONFIG += cgal
CONFIG += opencsg
CONFIG += boost
CONFIG += eigen2
#Uncomment the following line to enable QCodeEdit
#CONFIG += qcodeedit
mdi {
DEFINES += ENABLE_MDI
}
# FIXME: This can be made default by now
CONFIG += progresswidget
progresswidget {
DEFINES += USE_PROGRESSWIDGET
FORMS += src/ProgressWidget.ui
HEADERS += src/ProgressWidget.h
SOURCES += src/ProgressWidget.cc
}
include(common.pri)
win32 {
FLEXSOURCES = src/lexer.l
BISONSOURCES = src/parser.y
} else {
LEXSOURCES += src/lexer.l
YACCSOURCES += src/parser.y
}
RESOURCES = openscad.qrc
FORMS += src/MainWindow.ui \
src/Preferences.ui \
src/OpenCSGWarningDialog.ui
HEADERS += src/parsersettings.h \
src/renderer.h \
src/rendersettings.h \
src/ThrownTogetherRenderer.h \
src/CGAL_renderer.h \
src/OGL_helper.h \
src/GLView.h \
src/MainWindow.h \
src/Preferences.h \
src/OpenCSGWarningDialog.h \
src/builtin.h \
src/context.h \
src/csgterm.h \
src/csgtermnormalizer.h \
src/dxfdata.h \
src/dxfdim.h \
src/dxftess.h \
src/export.h \
src/expression.h \
src/function.h \
src/grid.h \
src/highlighter.h \
src/module.h \
src/node.h \
src/csgnode.h \
src/linearextrudenode.h \
src/rotateextrudenode.h \
src/projectionnode.h \
src/cgaladvnode.h \
src/importnode.h \
src/transformnode.h \
src/colornode.h \
src/rendernode.h \
src/openscad.h \
src/handle_dep.h \
src/polyset.h \
src/printutils.h \
src/value.h \
src/progress.h \
src/editor.h \
src/visitor.h \
src/state.h \
src/traverser.h \
src/nodecache.h \
src/nodedumper.h \
src/ModuleCache.h \
src/PolySetCache.h \
src/PolySetEvaluator.h \
src/CSGTermEvaluator.h \
src/Tree.h \
src/mathc99.h \
src/memory.h \
src/linalg.h \
src/system-gl.h \
src/stl-utils.h
SOURCES += src/mathc99.cc \
src/linalg.cc \
src/handle_dep.cc \
src/value.cc \
src/expr.cc \
src/func.cc \
src/module.cc \
src/node.cc \
src/context.cc \
src/csgterm.cc \
src/csgtermnormalizer.cc \
src/polyset.cc \
src/csgops.cc \
src/transform.cc \
src/color.cc \
src/primitives.cc \
src/projection.cc \
src/cgaladv.cc \
src/surface.cc \
src/control.cc \
src/render.cc \
src/dxfdata.cc \
src/dxfdim.cc \
src/linearextrude.cc \
src/rotateextrude.cc \
src/printutils.cc \
src/progress.cc \
src/parsersettings.cc \
\
src/nodedumper.cc \
src/traverser.cc \
src/PolySetEvaluator.cc \
src/ModuleCache.cc \
src/PolySetCache.cc \
src/Tree.cc \
\
src/rendersettings.cc \
src/highlighter.cc \
src/Preferences.cc \
src/OpenCSGWarningDialog.cc \
src/editor.cc \
src/glview.cc \
\
src/builtin.cc \
src/export.cc \
src/import.cc \
src/renderer.cc \
src/ThrownTogetherRenderer.cc \
src/dxftess.cc \
src/dxftess-glu.cc \
src/dxftess-cgal.cc \
src/CSGTermEvaluator.cc \
\
src/openscad.cc \
src/mainwin.cc
opencsg {
HEADERS += src/OpenCSGRenderer.h
SOURCES += src/OpenCSGRenderer.cc
}
cgal {
HEADERS += src/cgal.h \
src/cgalfwd.h \
src/cgalutils.h \
src/CGALEvaluator.h \
src/CGALCache.h \
src/PolySetCGALEvaluator.h \
src/CGALRenderer.h \
src/CGAL_Nef_polyhedron.h \
src/cgalworker.h
SOURCES += src/cgalutils.cc \
src/CGALEvaluator.cc \
src/PolySetCGALEvaluator.cc \
src/CGALCache.cc \
src/CGALRenderer.cc \
src/CGAL_Nef_polyhedron.cc \
src/CGAL_Nef_polyhedron_DxfData.cc \
src/cgaladv_minkowski2.cc \
src/cgalworker.cc
}
macx {
HEADERS += src/AppleEvents.h \
src/EventFilter.h
SOURCES += src/AppleEvents.cc
}
isEmpty(PREFIX):PREFIX = /usr/local
target.path = $$PREFIX/bin/
INSTALLS += target
examples.path = $$PREFIX/share/openscad/examples/
examples.files = examples/*
INSTALLS += examples
libraries.path = $$PREFIX/share/openscad/libraries/
libraries.files = libraries/*
INSTALLS += libraries
applications.path = $$PREFIX/share/applications
applications.files = icons/openscad.desktop
INSTALLS += applications
icons.path = $$PREFIX/share/pixmaps
icons.files = icons/openscad.png
INSTALLS += icons