1 | include(../spectrum.pri)
|
---|
2 |
|
---|
3 | TEMPLATE = app
|
---|
4 |
|
---|
5 | TARGET = spectrum
|
---|
6 | unix: !macx: !symbian: TARGET = spectrum.bin
|
---|
7 |
|
---|
8 | QT += multimedia
|
---|
9 |
|
---|
10 | SOURCES += main.cpp \
|
---|
11 | engine.cpp \
|
---|
12 | frequencyspectrum.cpp \
|
---|
13 | levelmeter.cpp \
|
---|
14 | mainwidget.cpp \
|
---|
15 | progressbar.cpp \
|
---|
16 | settingsdialog.cpp \
|
---|
17 | spectrograph.cpp \
|
---|
18 | spectrumanalyser.cpp \
|
---|
19 | tonegenerator.cpp \
|
---|
20 | tonegeneratordialog.cpp \
|
---|
21 | utils.cpp \
|
---|
22 | waveform.cpp \
|
---|
23 | wavfile.cpp
|
---|
24 |
|
---|
25 | HEADERS += engine.h \
|
---|
26 | frequencyspectrum.h \
|
---|
27 | levelmeter.h \
|
---|
28 | mainwidget.h \
|
---|
29 | progressbar.h \
|
---|
30 | settingsdialog.h \
|
---|
31 | spectrograph.h \
|
---|
32 | spectrum.h \
|
---|
33 | spectrumanalyser.h \
|
---|
34 | tonegenerator.h \
|
---|
35 | tonegeneratordialog.h \
|
---|
36 | utils.h \
|
---|
37 | waveform.h \
|
---|
38 | wavfile.h
|
---|
39 |
|
---|
40 | fftreal_dir = ../3rdparty/fftreal
|
---|
41 |
|
---|
42 | INCLUDEPATH += $${fftreal_dir}
|
---|
43 |
|
---|
44 | RESOURCES = spectrum.qrc
|
---|
45 |
|
---|
46 | symbian {
|
---|
47 | # Platform security capability required to record audio on Symbian
|
---|
48 | TARGET.CAPABILITY = UserEnvironment
|
---|
49 |
|
---|
50 | # Provide unique ID for the generated binary, required by Symbian OS
|
---|
51 | TARGET.UID3 = 0xA000E3FA
|
---|
52 | }
|
---|
53 |
|
---|
54 |
|
---|
55 | # Dynamic linkage against FFTReal DLL
|
---|
56 | !contains(DEFINES, DISABLE_FFT) {
|
---|
57 | symbian {
|
---|
58 | # Must explicitly add the .dll suffix to ensure dynamic linkage
|
---|
59 | LIBS += -lfftreal.dll
|
---|
60 | } else {
|
---|
61 | macx {
|
---|
62 | # Link to fftreal framework
|
---|
63 | LIBS += -F$${fftreal_dir}
|
---|
64 | LIBS += -framework fftreal
|
---|
65 | } else {
|
---|
66 | # Link to dynamic library which is written to ../bin
|
---|
67 | LIBS += -L../bin
|
---|
68 | LIBS += -lfftreal
|
---|
69 | }
|
---|
70 | }
|
---|
71 | }
|
---|
72 |
|
---|
73 | # Install
|
---|
74 |
|
---|
75 | sources.files = $$SOURCES $$HEADERS $$RESOURCES app.pro
|
---|
76 | sources.path = $$[QT_INSTALL_DEMOS]/spectrum/app
|
---|
77 | images.files += images/record.png images/settings.png
|
---|
78 | images.path = $$[QT_INSTALL_DEMOS]/spectrum/app/images
|
---|
79 | INSTALLS += sources images
|
---|
80 |
|
---|
81 | # Deployment
|
---|
82 |
|
---|
83 | symbian {
|
---|
84 | include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
|
---|
85 |
|
---|
86 | !contains(DEFINES, DISABLE_FFT) {
|
---|
87 | # Include FFTReal DLL in the SIS file
|
---|
88 | fftreal.sources = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/fftreal.dll
|
---|
89 | fftreal.path = !:/sys/bin
|
---|
90 | DEPLOYMENT += fftreal
|
---|
91 | }
|
---|
92 | } else {
|
---|
93 | macx {
|
---|
94 | # Specify directory in which to create spectrum.app bundle
|
---|
95 | DESTDIR = ..
|
---|
96 |
|
---|
97 | !contains(DEFINES, DISABLE_FFT) {
|
---|
98 | # Relocate fftreal.framework into spectrum.app bundle
|
---|
99 | framework_dir = ../spectrum.app/Contents/Frameworks
|
---|
100 | framework_name = fftreal.framework/Versions/1/fftreal
|
---|
101 | QMAKE_POST_LINK = \
|
---|
102 | mkdir -p $${framework_dir} &&\
|
---|
103 | rm -rf $${framework_dir}/fftreal.framework &&\
|
---|
104 | cp -R $${fftreal_dir}/fftreal.framework $${framework_dir} &&\
|
---|
105 | install_name_tool -id @executable_path/../Frameworks/$${framework_name} \
|
---|
106 | $${framework_dir}/$${framework_name} &&\
|
---|
107 | install_name_tool -change $${framework_name} \
|
---|
108 | @executable_path/../Frameworks/$${framework_name} \
|
---|
109 | ../spectrum.app/Contents/MacOS/spectrum
|
---|
110 | }
|
---|
111 | } else {
|
---|
112 | # Specify directory in which to create spectrum application
|
---|
113 | DESTDIR = ../bin
|
---|
114 |
|
---|
115 | unix: !symbian {
|
---|
116 | # On unices other than Mac OSX, we copy a shell script into the bin directory.
|
---|
117 | # This script takes care of correctly setting the LD_LIBRARY_PATH so that
|
---|
118 | # the dynamic library can be located.
|
---|
119 | copy_launch_script.target = copy_launch_script
|
---|
120 | copy_launch_script.commands = \
|
---|
121 | install -m 0555 $$QT_SOURCE_TREE/demos/spectrum/app/spectrum.sh ../bin/spectrum
|
---|
122 | QMAKE_EXTRA_TARGETS += copy_launch_script
|
---|
123 | POST_TARGETDEPS += copy_launch_script
|
---|
124 | }
|
---|
125 | }
|
---|
126 | }
|
---|
127 |
|
---|
128 |
|
---|