PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/demos/spectrum/app/app.pro

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