forked from pianobooster/PianoBooster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpianobooster.pro
More file actions
242 lines (201 loc) · 6.62 KB
/
pianobooster.pro
File metadata and controls
242 lines (201 loc) · 6.62 KB
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
CONFIG += release
#CONFIG += console
CONFIG += link_pkgconfig
# default
isEmpty(USE_FTGL): USE_FTGL="ON"
isEmpty(NO_DOCS): NO_DOCS="OFF"
isEmpty(NO_LICENSE): NO_LICENSE="OFF"
isEmpty(NO_CHANGELOG): NO_CHANGELOG="OFF"
isEmpty(WITH_MAN): WITH_MAN="OFF"
isEmpty(NO_LANGS): NO_LANGS="OFF"
# install all languages always
TRANSLATIONS = $$files(translations/*.ts)
CONFIG(debug, debug|release): DEFINES += IS_DEBUG
HEADERS = src/QtWindow.h \
src/GlView.h \
src/GuiTopBar.h \
src/GuiSidePanel.h \
src/GuiMidiSetupDialog.h \
src/GuiKeyboardSetupDialog.h \
src/GuiPreferencesDialog.h \
src/GuiSongDetailsDialog.h \
src/GuiLoopingPopup.h \
src/Settings.h \
src/Draw.h \
src/TrackList.h
FORMS = src/GuiTopBar.ui \
src/GuiSidePanel.ui \
src/GuiMidiSetupDialog.ui \
src/GuiKeyboardSetupDialog.ui \
src/GuiPreferencesDialog.ui \
src/GuiSongDetailsDialog.ui \
src/GuiLoopingPopup.ui
RESOURCES = src/application.qrc
SOURCES = src/QtMain.cpp \
src/QtWindow.cpp \
src/GuiTopBar.cpp \
src/GuiSidePanel.cpp \
src/GuiMidiSetupDialog.cpp \
src/GuiKeyboardSetupDialog.cpp \
src/GuiPreferencesDialog.cpp \
src/GuiSongDetailsDialog.cpp \
src/GuiLoopingPopup.cpp \
src/GlView.cpp \
src/MidiFile.cpp \
src/MidiTrack.cpp \
src/Song.cpp \
src/Conductor.cpp \
src/Util.cpp \
src/Chord.cpp \
src/Tempo.cpp \
src/MidiDevice.cpp \
src/MidiDeviceRt.cpp \
src/StavePosition.cpp \
src/Score.cpp \
src/Cfg.cpp \
src/Piano.cpp \
src/Draw.cpp \
src/Scroll.cpp \
src/Notation.cpp \
src/TrackList.cpp \
src/Rating.cpp \
src/Bar.cpp \
src/Settings.cpp \
src/Merge.cpp
contains(USE_BUNDLED_RTMIDI, ON){
message(building using bundled rtmidi)
DEFINES += USE_BUNDLED_RTMIDI
INCLUDEPATH += src/3rdparty
SOURCES += src/3rdparty/rtmidi/RtMidi.cpp
}else{
message(building using system rtmidi)
PKGCONFIG += rtmidi
}
contains(USE_FTGL, ON){
message(building using ftgl)
PKGCONFIG += ftgl
}else{
message(building without ftgl)
DEFINES += NO_USE_FTGL
}
contains(NO_LANGS, ON){
message(building without languages)
DEFINES += NO_LANGS
}
isEmpty(DATA_DIR){
DATA_DIR=share/games/pianobooster
}
message("DATA_DIR:" $$DATA_DIR)
DEFINES += DATA_DIR="\\\""$$DATA_DIR"\\\""
RC_FILE = src/pianobooster.rc
OBJECTS_DIR = tmp
win32 {
DEFINES += __WINDOWS_MM__ _WIN32
LIBS += libwinmm
}
unix {
DEFINES += __LINUX_ALSA__
LIBS += -lpthread -lGL -lasound
}
contains (EXPERIMENTAL_USE_FLUIDSYNTH, ON) {
message("building using fluidsynth")
DEFINES += EXPERIMENTAL_USE_FLUIDSYNTH
SOURCES += src/MidiDeviceFluidSynth.cpp
!isEmpty(FLUIDSYNTH_INPLACE_DIR) {
!exists( $${FLUIDSYNTH_INPLACE_DIR}/include/fluidsynth.h ) {
error( "No $${FLUIDSYNTH_INPLACE_DIR}/include/fluidsynth.h file found" )
}
message(fluidsynth FLUIDSYNTH_INPLACE_DIR = $${FLUIDSYNTH_INPLACE_DIR})
INCLUDEPATH += $${FLUIDSYNTH_INPLACE_DIR}/include/
win32:LIBS += $${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.dll.a
unix:LIBS += $${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.a
}else{
PKGCONFIG += fluidsynth
}
}
QT += xml opengl widgets
# enable the console window
#QT+=testlib
isEmpty(QMAKE_LRELEASE) {
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
!win32 {
system($${QMAKE_LRELEASE} $${_PRO_FILE_} 2> /dev/null)
}
win32 {
system($$[QT_INSTALL_BINS]\\lrelease.exe $${_PRO_FILE_})
}
isEmpty( PREFIX ) { PREFIX = /usr }
message("PREFIX:" $$PREFIX)
DEFINES += PREFIX="\\\""$$PREFIX"\\\""
unix {
target.path = $$PREFIX/bin
contains(NO_DOCS, OFF){
message(building with docs)
docs.path = $$PREFIX/share/doc/pianobooster
docs.files = README.md doc/faq.md
INSTALLS += docs
}
contains(NO_LICENSE, OFF){
message(building with license)
license.path = $$PREFIX/share/licenses/pianobooster
license.files = license.txt
INSTALLS += license
}
contains(NO_CHANGELOG, OFF){
message(building with changelog)
changelog.path = $$PREFIX/share/doc/pianobooster
changelog.files = Changelog.txt
INSTALLS += changelog
}
contains(WITH_MAN, ON){
message(building with man)
man.path = $$PREFIX/share/man/man6/
man.files = pianobooster.6
INSTALLS += man
}
!contains(USE_SYSTEM_FONT, ON){
message(building using system font)
font.path = $$PREFIX/$$DATA_DIR/fonts
font.files = src/fonts/DejaVuSans.ttf
INSTALLS += font
}
!isEmpty(USE_FONT){
message(building with specified font)
myfont.path = $$PREFIX/$$DATA_DIR/fonts
myfont.files = $$USE_FONT
INSTALLS += myfont
DEFINES += USE_FONT=$$USE_FONT
}
contains(NO_LANGS, OFF){
updateqm.input = TRANSLATIONS
updateqm.output = translations/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm translations/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
data_langs.path = $$PREFIX/$$DATA_DIR/translations
data_langs.files = translations/*.qm translations/langs.json
INSTALLS += data_langs
data_langs_fix.path = $$PREFIX/$$DATA_DIR/translations/
data_langs_fix.extra = rm ${INSTALL_ROOT}$$PREFIX/$$DATA_DIR/translations/music_blank.qm \
${INSTALL_ROOT}$$PREFIX/$$DATA_DIR/translations/pianobooster_blank.qm
INSTALLS += data_langs_fix
}
desktop.path = $$PREFIX/share/applications
desktop.files = pianobooster.desktop
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
icon32.files = icons/hicolor/32x32/pianobooster.png
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
icon48.files = icons/hicolor/48x48/pianobooster.png
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
icon64.files = icons/hicolor/64x64/pianobooster.png
music.path = $$PREFIX/$$DATA_DIR/music
music.files = music/BoosterMusicBooks.zip
INSTALLS += target desktop icon32 icon48 icon64 music
}