forked from narunlifescience/AlphaPlot
/
config.pri
317 lines (247 loc) · 12.5 KB
/
config.pri
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
### In most cases, defaults and auto-detection should provide an easy way of
### building AlphaPlot without changing anything in this file (in contrast to
### prior versions).
###
### Windows users are expected to place all dependencies in the 3rdparty folder
### with default directory names (i.e., with version numbers stripped). In case
### you already have copies of the libraries installed somewhere, you need to
### change the paths below in order to use them.
###
### On Linux and MacOS X, the default configuration assumes Qwt and QwtPlot3D
### sources to be unpacked to the 3rdparty folders, with version numbers
### stripped from the directory names (as on Windows). If you're sure that a
### system-wide installation of Qwt and QwtPlot3D (e.g. from your distribution's
### package manager) is compiled against Qt4 (not Qt3), you can use it by
### executing "qmake PRESET=linux_package" instead of just "qmake" during the
### build process. Note that this also disables some features which are
### commonly not needed or even bothersome when integrating AlphaPlot in a
### package manager (user-selectable paths to manual/plugins, checking for new
### versions on startup).
################################################################################
### Choose between common configurations #
### #
### (currently not applicable on Windows) #
### Depending on your system and requirements, you may or may not need to #
### fine-tune other options below. #
################################################################################
unix:isEmpty(PRESET) { # allow command-line argument to override settings here
### Link statically against Qwt and Qwtplot3D in 3rdparty folder
### (in order to make sure they're compiled against Qt4, not Qt3).
### Intended for Linux users building from source (on possibly somewhat
### older systems).
#PRESET = default_installation
### Link dynamically against system-wide installed libraries. Intended mainly
### for building Linux packages for distributions with Qwt and QwtPlot3D
### packages compiled against Qt4 (probably most current ones).
PRESET = linux_package
### Link statically as much as possible. Qwt, QwtPlot3D and MuParser are
### expected to be supplied in the 3rdparty folder. Python, SIP, PyQt and Qt
### are linked in dynamically in order to integrate with an existing Python
### installation. Intended mainly for building self-contained Linux binaries.
### (TODO: Could we include SIP+PyQt+Qt in the self-contained bundle, as done
### in the Windows installer?)
#PRESET = self_contained
}
unix:message(Building with preset $$PRESET)
################################################################################
### What to install #
### #
### Comment out anything you want to exclude. #
################################################################################
### Linux Desktop integration
!contains(PRESET, self_contained) {
unix:INSTALLS += desktop_entry mime_package mime_link icons
}
################################################################################
### Where to install #
### #
### IMPORTANT: The paths given here specify where AlphaPlot will search for #
### the files at runtime. If you want "make install" to place them #
### anywhere else (e.g. in a temporary directory structure used for #
### building a package), use "make INSTALL_ROOT=/some/place install"#
### and/or copy files to the desired locations by other means. #
################################################################################
unix {# Linux / MacOS X
contains(PRESET, self_contained) {
### Unless you're trying to build a self-contained bundle, see the
### (heavily commented) "else" block below.
### When installing into a self-contained directory structure (e.g. for
### universal Linux binaries), use relative paths at runtime in order to
### support relocation.
isEmpty(INSTALLBASE): INSTALLBASE = .
target.path = "$$INSTALLBASE"
documentation.path = "$$INSTALLBASE/doc"
manual.path = "$$INSTALLBASE/manual"
translationfiles.path = "$$INSTALLBASE/translations"
pythonconfig.path = "$$INSTALLBASE"
pythonutils.path = "$$INSTALLBASE"
plugins.path = "$$INSTALLBASE/plugins"
} else {
### this is what is called "prefix" when using GNU autotools
isEmpty(INSTALLBASE): INSTALLBASE = /usr
### where to put the binary (the application itself)
target.path = "$$INSTALLBASE/bin"
### location of documentation files
documentation.path = "$$INSTALLBASE/share/doc/AlphaPlot"
### Usually, the manual will be expected in the "manual" subfolder of "documentation.path" (see above).
### To override this, uncomment the next line and adjust the path behind the '='.
#manual.path = "$$INSTALLBASE/share/doc/AlphaPlot/manual"
### location of translation files (*.qm)
translationfiles.path = "$$INSTALLBASE/share/AlphaPlot/translations"
### Important (if you use Python): the following two paths are where the application will expect
### AlphaPlotrc.py and AlphaPlotUtil.py, respectively. Alternatively you can also put AlphaPlotrc.py
### (or ".AlphaPlot.py") into the users home directory. AlphaPlotUtil.py must be either in the
### directory specified here or somewhere else in the python path (sys.path) where "import" can find it
### where AlphaPlotrc.py is searched for at runtime
pythonconfig.path = "$$INSTALLBASE/../etc"
### where the AlphaPlotUtil python module is searched for at runtime
pythonutils.path = "$$INSTALLBASE/share/AlphaPlot"
### where plugins are expected by default
plugins.path = "$$INSTALLBASE/lib/AlphaPlot/plugins"
}
} # Linux / MacOS X
win32 {# Windows
isEmpty(INSTALLBASE): INSTALLBASE = .
target.path = "$$INSTALLBASE"
documentation.path = "$$INSTALLBASE"
translationfiles.path = "$$INSTALLBASE/translations"
pythonconfig.path = "$$INSTALLBASE"
pythonutils.path = "$$INSTALLBASE"
plugins.path = "$$INSTALLBASE/fitPlugins"
}
### 64bit Linux only suffix
linux-g++-64: libsuff = 64
unix:LIBS += -L/usr/lib$${libsuff}
################################################################################
### Optional features #
################################################################################
### a console displaying output of scripts; particularly useful on Windows
### where running AlphaPlot from a terminal is inconvenient
DEFINES += SCRIPTING_CONSOLE
### a dialog for selecting the scripting language on a per-project basis
DEFINES += SCRIPTING_DIALOG
!contains(PRESET, linux_package) {
### Enables choosing of help folder at runtime, instead of relying on the above path only.
### The downside is that the help folder will be remembered as a configuration option, so a binary
### package cannot easily update the path for its users.
### Dynamic selection of the manual path was the only available option up until AlphaPlot 0.2.3.
DEFINES += DYNAMIC_MANUAL_PATH
### Similar to DYNAMIC_MANUAL_PATH, but for the plugin folder
DEFINES += DYNAMIC_PLUGIN_PATH
### Check for new releases on startup (can be disabled in the preferences).
DEFINES += SEARCH_FOR_UPDATES
### Provide links to manual/translations download in help menu
DEFINES += DOWNLOAD_LINKS
}
### python support
osx_dist|aegis {
#CONFIG += python
}
################################################################################
### Dependencies #
################################################################################
contains(PRESET, default_installation) {
### Link statically against Qwt and Qwtplot3D (in order to make sure they
### are compiled against Qt4), dynamically against everything else.
INCLUDEPATH += ../3rdparty/qwt/src
LIBS += ../3rdparty/qwt/lib/libqwt.a
INCLUDEPATH += ../3rdparty/qwtplot3d/include
LIBS += ../3rdparty/qwtplot3d/lib/libqwtplot3d.a
INCLUDEPATH += /usr/include/muParser
LIBS += -lgsl -lgslcblas -lz -lGLU
LIBS += -lmuparser
}
osx_dist {
# Uses MacPorts supplied versions of the dependencies
INCLUDEPATH += /opt/local/include
INCLUDEPATH += /opt/local/include/qwt
LIBS += -L/opt/local/lib -lqwt
INCLUDEPATH += /opt/local/include/qwtplot3d
LIBS += -lqwtplot3d
INCLUDEPATH += /opt/local/include/muParser
LIBS += -lgsl -lgslcblas -lz
LIBS += -lmuparser -lpython2.7
# this was an attempt to add a post build step. Doesn't seem to work,
# so just run this step manually
QMAKE_EXTRA_TARGETS += mac-dist
mac-dist.commands = sh mkMacDist.sh
}
contains(PRESET, linux_package) {
### dynamically link against Qwt(3D) installed system-wide
### WARNING: make sure they are compiled against >= Qt4.2
### Mixing Qt 4.2 and Qt >= 4.3 compiled stuff may also
### cause problems.
### Debian suffix
exists(/usr/include/qwt-qt4): qwtsuff = "-qt4"
exists(/usr/include/qwt5) {
INCLUDEPATH += /usr/include/qwt5
LIBS += -lqwt5
} else {
INCLUDEPATH += /usr/include/qwt$${qwtsuff}
LIBS += -lqwt$${qwtsuff}
}
INCLUDEPATH = "$(HOME)/usr/include" $$INCLUDEPATH
QMAKE_LIBDIR = "$(HOME)/usr/lib" $$QMAKE_LIBDIR
INCLUDEPATH += /usr/include/qwtplot3d
LIBS += -lqwtplot3d$${qwtsuff}
LIBS += -lz -lGLU
INCLUDEPATH += /usr/include/muParser
LIBS += -lgsl -lgslcblas
LIBS += -lmuparser
}
contains(PRESET, self_contained) {
### mostly static linking, for self-contained binaries
INCLUDEPATH += ../3rdparty/qwt/src
LIBS += ../3rdparty/qwt/lib/libqwt.a
INCLUDEPATH += ../3rdparty/qwtplot3d/include
LIBS += ../3rdparty/qwtplot3d/lib/libqwtplot3d.a
INCLUDEPATH += ../3rdparty/muparser/include
LIBS += ../3rdparty/muparser/lib/libmuparser.a
LIBS += /usr/lib/libgsl.a /usr/lib/libgslcblas.a
}
win32: {
!mxe {
### Static linking mostly, except Qt, Python and QwtPlot3D.
### The latter seems to be impossible to link statically on Windows.
isEmpty(LIBPATH): LIBPATH = ../3rdparty
INCLUDEPATH += "$${LIBPATH}/qwt/src"
LIBS += "$${LIBPATH}/qwt/lib/libqwt.a"
INCLUDEPATH += "$${LIBPATH}/qwtplot3d/include"
LIBS += "$${LIBPATH}/qwtplot3d/lib/qwtplot3d.dll"
INCLUDEPATH += "$${LIBPATH}/muparser/include"
LIBS += "$${LIBPATH}/muparser/lib/libmuparser.a"
INCLUDEPATH += "$${LIBPATH}/gsl/include"
LIBS += "$${LIBPATH}/gsl/lib/libgsl.a"
LIBS += "$${LIBPATH}/gsl/lib/libgslcblas.a"
}
}
# Mingw cross compilation environment on Linux.
mxe {
QMAKE_CXXFLAGS +=-g
DEFINES += CONSOLE
INCLUDEPATH += . "$$(HOME)/usr/mxe/include"
LIBPATH += "$(HOME)/usr/mxe/lib" "$(HOME)/usr/mxe/lib64"
LIBS += -mwindows -lqwt -lqwtplot3d -lmuparser -lgsl -lgslcblas
# Qt libraries specified here to get around a dependency bug in qmake
LIBS += -lQt3Support -lQtOpenGL -lQtGui -lQtNetwork -lQtCore
LIBS += -lole32 -loleaut32 -limm32 -lcomdlg32 -luuid
LIBS += -lwinspool -lssl -lcrypto -lwinmm -lgdi32 -lws2_32
LIBS += -ljpeg -lpng -lmng -ltiff -lz -llzma -llcms2
LIBS += -lopengl32 -lglu32
}
#############################################################################
### Names of the lupdate and lrelease programs #
### #
### These are needed if you want to compile and install the translations #
### automatically. Possibly needs to be adapted if you have an unusual Qt #
### installation. #
#############################################################################
exists(/usr/bin/lupdate-qt4) {
# Debian, Ubuntu, Fedora
LUPDATE_BIN = lupdate-qt4
LRELEASE_BIN = lrelease-qt4
} else {
# anything else
LUPDATE_BIN = lupdate
LRELEASE_BIN = lrelease
}