source: trunk/demos/spectrum/app/app.pro@ 769

Last change on this file since 769 was 769, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

File size: 3.9 KB
Line 
1include(../spectrum.pri)
2
3TEMPLATE = app
4
5TARGET = spectrum
6unix: !macx: !symbian: TARGET = spectrum.bin
7
8QT += multimedia
9
10SOURCES += 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
25HEADERS += 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
40fftreal_dir = ../3rdparty/fftreal
41
42INCLUDEPATH += $${fftreal_dir}
43
44RESOURCES = spectrum.qrc
45
46symbian {
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
75sources.files = $$SOURCES $$HEADERS $$RESOURCES app.pro
76sources.path = $$[QT_INSTALL_DEMOS]/spectrum/app
77images.files += images/record.png images/settings.png
78images.path = $$[QT_INSTALL_DEMOS]/spectrum/app/images
79INSTALLS += sources images
80
81# Deployment
82
83symbian {
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
Note: See TracBrowser for help on using the repository browser.