forked from CsoundQt/CsoundQt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.pri
249 lines (237 loc) · 8.51 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
CONFIG *= thread \
warn_on
CONFIG -= stl
QT *= xml
build32:TMPDIR = build/floats
build64:TMPDIR = build/doubles
#build64:DEFINES += USE_DOUBLE
OBJECTS_DIR = "$${TMPDIR}/obj"
RTMIDI_VERSIONS = "rtmidi-2.1.1" "rtmidi-2.1.0" "rtmidi-2.0.1" "rtmidi-1.0.15"
for (rtdir, RTMIDI_VERSIONS) {
DEFAULT_RTMIDI_DIRNAME=$$rtdir
DEFAULT_RTMIDI_DIRS += $${DEFAULT_RTMIDI_DIRNAME} \
../$${DEFAULT_RTMIDI_DIRNAME} \
../../$${DEFAULT_RTMIDI_DIRNAME} \
../../../$${DEFAULT_RTMIDI_DIRNAME}
}
exists(config.user.pri) {
include(config.user.pri)
message(... config.user.pri found)
}
!no_messages {
message()
build32:message(Building CsoundQt for the single precision version of Csound.)
build64:message(Building CsoundQt for the double precision version of Csound.)
CONFIG(debug, debug|release):message(Building debug version.)
CONFIG(release, debug|release):message(Building release version.)
message()
message(CONFIG ...)
for(flag, CONFIG):message(+ $$flag)
message()
}
isEmpty(CSOUND_API_INCLUDE_DIR) {
!isEmpty(CSOUND_INCLUDE_DIR):CSOUND_API_INCLUDE_DIR = $${CSOUND_INCLUDE_DIR}
isEmpty(CSOUND_API_INCLUDE_DIR):!isEmpty(CSOUND_SOURCE_TREE) {
CSOUND_API_INCLUDE_DIR = $${CSOUND_SOURCE_TREE}/include
CSOUND_INTERFACES_INCLUDE_DIR = $${CSOUND_SOURCE_TREE}/interfaces
}
isEmpty(CSOUND_API_INCLUDE_DIR) {
!no_messages:message(Csound API include directory not specified.)
for(dir, DEFAULT_CSOUND_API_INCLUDE_DIRS) {
!no_messages:message(... searching in $${dir})
exists($${dir}):exists($${dir}/csound.h):exists($${dir}/cwindow.h) {
!no_messages {
message(CSOUND_API_INCLUDE_DIR set to $${dir})
message()
}
CSOUND_API_INCLUDE_DIR = $${dir}
break()
}
}
}
isEmpty(CSOUND_API_INCLUDE_DIR):error(A valid Csound API include directory was not found.)
}
isEmpty(CSOUND_LIBRARY_DIR) {
!isEmpty(CSOUND_SOURCE_TREE):CSOUND_LIBRARY_DIR = $${CSOUND_SOURCE_TREE}
else {
!no_messages:message(Csound library directory not specified.)
for(dir, DEFAULT_CSOUND_LIBRARY_DIRS) {
!no_messages:message(... searching in $${dir})
exists($${dir}) {
!no_messages:message(... in $${dir} for $${DEFAULT_CSOUND_LIBS})
for(csound_lib, DEFAULT_CSOUND_LIBS):exists($${dir}/$${csound_lib}) {
!no_messages {
message(CSOUND_LIBRARY_DIR set to $${dir})
message()
}
CSOUND_LIB = $${csound_lib}
CSOUND_LIBRARY_DIR = $${dir}
break()
}
}
}
}
isEmpty(CSOUND_LIBRARY_DIR):error(A valid Csound library directory was not found.)
}
isEmpty(CSOUND_LIB) {
for(csound_lib, DEFAULT_CSOUND_LIBS) {
message(Searching $${CSOUND_LIBRARY_DIR}/$${csound_lib})
exists($${CSOUND_LIBRARY_DIR}/$${csound_lib}) {
CSOUND_LIB = $${csound_lib}
break()
}
}
isEmpty(CSOUND_LIB):error(A valid csound library was not found.)
}
pythonqt {
DEFINES += QCS_PYTHONQT
win32:isEmpty(PYTHON_INCLUDE_DIR) {
!no_messages:message(Python directory not specified.)
for(dir, DEFAULT_PYTHON_INCLUDE_DIRS) {
!no_messages:message(... searching in $${dir})
exists($${dir}) {
!no_messages {
message(PYTHON_INCLUDE_DIR set to $${dir})
message()
}
PYTHON_INCLUDE_DIR = $${dir}
break()
}
}
isEmpty(PYTHON_INCLUDE_DIR):error(A valid Python directory was not found.)
}
isEmpty(PYTHONQT_SRC_DIR) {
!no_messages:message(PythonQt source directory not specified.)
for(dir, DEFAULT_PYTHONQT_SRC_DIRS) {
!no_messages:message(... searching in $${dir})
exists($${dir}) {
!no_messages {
message(PYTHONQT_SRC_DIR set to $${dir})
message()
}
PYTHONQT_SRC_DIR = $${dir}
break()
}
}
isEmpty(PYTHONQT_SRC_DIR):error(A valid PythonQt source directory was not found.)
}
isEmpty(PYTHONQT_LIB_DIR) {
!no_messages:message(PythonQt library directory not specified. Using source directory.)
PYTHONQT_LIB_DIR = $${PYTHONQT_SRC_DIR}/lib
}
}
rtmidi {
isEmpty(RTMIDI_DIR) {
!no_messages:message(RtMidi include directory not specified.)
for(dir, DEFAULT_RTMIDI_DIRS) {
!no_messages:message(... searching in $${dir})
exists($${dir}) {
!no_messages {
message(RTMIDI_DIR set to $${dir})
message()
}
RTMIDI_DIR = $${dir}
break()
}
}
}
!rtmidi: message(Not building RtMidi support)
}
win32 {
CSOUND_INCLUDE_DIR = $$replace(CSOUND_INCLUDE_DIR, \\\\, /)
CSOUND_LIBRARY_DIR = $$replace(CSOUND_LIBRARY_DIR, \\\\, /)
}
!no_messages {
message(Csound API include directory is $${CSOUND_API_INCLUDE_DIR})
message(Csound interfaces include directory is $${CSOUND_INTERFACES_INCLUDE_DIR})
message(Csound library directory is $${CSOUND_LIBRARY_DIR})
message(Csound library is $${DEFAULT_CSOUND_LIBS})
pythonqt {
win32:message(Python include directory is $${PYTHON_INCLUDE_DIR})
message(PythonQt source tree directory is $${PYTHONQT_SRC_DIR})
message(PythonQt lib directory is $${PYTHONQT_LIB_DIR})
}
rtmidi {
message(RtMidi directory is $${RTMIDI_DIR})
DEFINES += QCS_RTMIDI
exists($${RTMIDI_DIR}/RtError.h): {
DEFINES += QCS_OLD_RTMIDI
message("Using RtMidi < 2.1")
}
}
message()
}
!no_checks {
defineTest(directoryExists) {
exists($${1}):return(true)
return(false)
}
defineTest(csoundApiHeaderExists) {
exists($${CSOUND_API_INCLUDE_DIR}/$${1}):return(true)
return(false)
}
defineTest(csoundInterfacesHeaderExists) {
exists($${CSOUND_INTERFACES_INCLUDE_DIR}/$${1}):return(true)
return(false)
}
defineTest(csoundLibraryExists) {
exists($${CSOUND_LIBRARY_DIR}/$${1}):return(true)
return(false)
}
!directoryExists($${CSOUND_API_INCLUDE_DIR}):error(Csound API include directory not found)
!directoryExists($${CSOUND_LIBRARY_DIR}):error(Csound library directory not found)
pythonqt {
win32:!directoryExists($${PYTHON_INCLUDE_DIR}):error(Python include directory not found)
!directoryExists($${PYTHONQT_SRC_DIR}):error(PythonQt include directory not found)
!directoryExists($${PYTHONQT_LIB_DIR}):error(PythonQt build directory not found)
}
!csoundApiHeaderExists(csound.h):error(csound.h not found)
!csoundApiHeaderExists(csound.hpp):error(csound.hpp not found)
!csoundApiHeaderExists(cwindow.h):error(cwindow.h not found)
!csoundLibraryExists($${CSOUND_LIB}):error(Csound API library not found)
}
exists (src/csPerfThread.hpp) {
CONFIG += perfThread_build
message(Building csPerfThread sources.)
}
!is_quteapp {
win32 {
exists (src/res/windows/QuteApp_f.exe) :CONFIG += quteapp_f
exists (src/res/windows/QuteApp_d.exe) :CONFIG += quteapp_d
}
unix {
macx {
# Nothing here as it's not saved in the qrc in OS X but inside the app bundle
}
else {
exists (src/res/linux/QuteApp_f) :CONFIG += quteapp_f
exists (src/res/linux/QuteApp_d) :CONFIG += quteapp_d
#!quteapp_f: message(Not bundling QuteApp_f. Please put QuteApp_f in the res/ folder)
#!quteapp_d: message(Not bundling QuteApp_d. Please put QuteApp_d in the res/ folder)
}
}
}
html5 {
message ("Configuring for HTML5 build.")
message("All HTML5 configuration is via environment variable CEF_HOME.")
message("This points to the installation directory, not the source directory.")
CEF_INCLUDE_DIR = $(CEF_HOME)
debug {
CEF_LIB = $$(CEF_HOME)\\Debug\\libcef.lib
#CEF_LIB += $$(CEF_HOME)\\Debug\\cef_sandbox.lib
CEF_WRAPPER_LIB = $$(CEF_HOME)\\libcef_dll\\Debug\\libcef_dll_wrapper.lib
}
release {
CEF_LIB = $$(CEF_HOME)\\Release\\libcef.lib
#CEF_LIB += $$(CEF_HOME)\\Release\\cef_sandbox.lib
CEF_WRAPPER_LIB = $$(CEF_HOME)\\libcef_dll\\Release\\libcef_dll_wrapper.lib
}
INCLUDEPATH += $${CEF_INCLUDE_DIR}
LIBS += $${CEF_LIB}
LIBS += $${CEF_WRAPPER_LIB}
DEFINES += QCS_HTML5
#DEFINES += CEF_USE_SANDBOX
LIBS += user32.lib
win32-msvc2013:QMAKE_CXXFLAGS += -ID:\\msys\\local\\include -DSUB_PROCESS_DISABLED=1 /Zi
win32-msvc2013:QMAKE_LFLAGS += /DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO
}