1 | include(../spectrum.pri)
|
---|
2 |
|
---|
3 | static: error(This application cannot be statically linked to the fftreal library)
|
---|
4 |
|
---|
5 | TEMPLATE = app
|
---|
6 |
|
---|
7 | TARGET = spectrum
|
---|
8 |
|
---|
9 | QT += multimedia
|
---|
10 |
|
---|
11 | SOURCES += main.cpp \
|
---|
12 | engine.cpp \
|
---|
13 | frequencyspectrum.cpp \
|
---|
14 | levelmeter.cpp \
|
---|
15 | mainwidget.cpp \
|
---|
16 | progressbar.cpp \
|
---|
17 | settingsdialog.cpp \
|
---|
18 | spectrograph.cpp \
|
---|
19 | spectrumanalyser.cpp \
|
---|
20 | tonegenerator.cpp \
|
---|
21 | tonegeneratordialog.cpp \
|
---|
22 | utils.cpp \
|
---|
23 | waveform.cpp \
|
---|
24 | wavfile.cpp
|
---|
25 |
|
---|
26 | HEADERS += engine.h \
|
---|
27 | frequencyspectrum.h \
|
---|
28 | levelmeter.h \
|
---|
29 | mainwidget.h \
|
---|
30 | progressbar.h \
|
---|
31 | settingsdialog.h \
|
---|
32 | spectrograph.h \
|
---|
33 | spectrum.h \
|
---|
34 | spectrumanalyser.h \
|
---|
35 | tonegenerator.h \
|
---|
36 | tonegeneratordialog.h \
|
---|
37 | utils.h \
|
---|
38 | waveform.h \
|
---|
39 | wavfile.h
|
---|
40 |
|
---|
41 | fftreal_dir = ../3rdparty/fftreal
|
---|
42 |
|
---|
43 | INCLUDEPATH += $${fftreal_dir}
|
---|
44 |
|
---|
45 | RESOURCES = spectrum.qrc
|
---|
46 |
|
---|
47 | symbian {
|
---|
48 | # Platform security capability required to record audio on Symbian
|
---|
49 | TARGET.CAPABILITY = UserEnvironment
|
---|
50 |
|
---|
51 | # Provide unique ID for the generated binary, required by Symbian OS
|
---|
52 | TARGET.UID3 = 0xA000E402
|
---|
53 | }
|
---|
54 |
|
---|
55 |
|
---|
56 | # Dynamic linkage against FFTReal DLL
|
---|
57 | !contains(DEFINES, DISABLE_FFT) {
|
---|
58 | symbian {
|
---|
59 | # Must explicitly add the .dll suffix to ensure dynamic linkage
|
---|
60 | LIBS += -lfftreal.dll
|
---|
61 | QMAKE_LIBDIR += $${fftreal_dir}
|
---|
62 | } else {
|
---|
63 | macx {
|
---|
64 | # Link to fftreal framework
|
---|
65 | LIBS += -F$${fftreal_dir}
|
---|
66 | LIBS += -framework fftreal
|
---|
67 | } else {
|
---|
68 | LIBS += -L..$${spectrum_build_dir}
|
---|
69 | LIBS += -lfftreal
|
---|
70 | }
|
---|
71 | }
|
---|
72 | }
|
---|
73 |
|
---|
74 | # Install
|
---|
75 |
|
---|
76 | sources.files = $$SOURCES $$HEADERS $$RESOURCES app.pro
|
---|
77 | sources.path = $$[QT_INSTALL_DEMOS]/spectrum/app
|
---|
78 | images.files += images/record.png images/settings.png
|
---|
79 | images.path = $$[QT_INSTALL_DEMOS]/spectrum/app/images
|
---|
80 | INSTALLS += sources images
|
---|
81 |
|
---|
82 | # Deployment
|
---|
83 |
|
---|
84 | symbian {
|
---|
85 | include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
|
---|
86 |
|
---|
87 | !contains(DEFINES, DISABLE_FFT) {
|
---|
88 | # Include FFTReal DLL in the SIS file
|
---|
89 | fftreal.sources = ../fftreal.dll
|
---|
90 | fftreal.path = !:/sys/bin
|
---|
91 | DEPLOYMENT += fftreal
|
---|
92 | }
|
---|
93 | } else {
|
---|
94 | DESTDIR = ..$${spectrum_build_dir}
|
---|
95 | macx {
|
---|
96 | !contains(DEFINES, DISABLE_FFT) {
|
---|
97 | # Relocate fftreal.framework into spectrum.app bundle
|
---|
98 | framework_dir = ../spectrum.app/Contents/Frameworks
|
---|
99 | framework_name = fftreal.framework/Versions/1/fftreal
|
---|
100 | QMAKE_POST_LINK = \
|
---|
101 | mkdir -p $${framework_dir} &&\
|
---|
102 | rm -rf $${framework_dir}/fftreal.framework &&\
|
---|
103 | cp -R $${fftreal_dir}/fftreal.framework $${framework_dir} &&\
|
---|
104 | install_name_tool -id @executable_path/../Frameworks/$${framework_name} \
|
---|
105 | $${framework_dir}/$${framework_name} &&\
|
---|
106 | install_name_tool -change $${framework_name} \
|
---|
107 | @executable_path/../Frameworks/$${framework_name} \
|
---|
108 | ../spectrum.app/Contents/MacOS/spectrum
|
---|
109 | }
|
---|
110 | } else {
|
---|
111 | linux-g++*: {
|
---|
112 | # Provide relative path from application to fftreal library
|
---|
113 | QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
|
---|
114 | }
|
---|
115 | }
|
---|
116 | }
|
---|
117 |
|
---|
118 |
|
---|