Mercurial > hg > sonic-annotator
comparison sv.prf @ 2:475f4623feba
* build update for runner with "incorporated" SV libraries
author | Chris Cannam |
---|---|
date | Thu, 11 Dec 2008 11:01:37 +0000 |
parents | |
children | 3bd7b07c0891 |
comparison
equal
deleted
inserted
replaced
1:92911f967a16 | 2:475f4623feba |
---|---|
1 | |
2 ### | |
3 ### BEGIN CONFIGURABLE STUFF | |
4 ### | |
5 | |
6 CONFIG += release | |
7 | |
8 | |
9 # Put your favourite optimization flags here. | |
10 # | |
11 # Don't use -ffast-math -- it does make things faster, but it | |
12 # prevents isnan and isinf from working, and we need those. | |
13 # | |
14 # SV benefits a bit from SSE, but not from SSE2 (it doesn't do | |
15 # very much in double precision). | |
16 # | |
17 # Always define NDEBUG and NO_TIMING for release builds. | |
18 # | |
19 QMAKE_CXXFLAGS_RELEASE += -DNDEBUG -DNO_TIMING -O3 | |
20 #linux-g++:QMAKE_CXXFLAGS_RELEASE += -march=pentium3 -msse -mmmx -ftree-vectorize -fomit-frame-pointer | |
21 | |
22 # To do a static build with gcc on Linux | |
23 # | |
24 linux-g++:LIBS += -Wl,-Bstatic | |
25 linux-g++:DEFINES += BUILD_STATIC | |
26 | |
27 | |
28 LIBPATH += /usr/local/lib | |
29 INCLUDEPATH += /usr/local/include | |
30 | |
31 DEFINES += NO_SV_GUI # avoid inclusion of widgets/ in transform library (bad!) | |
32 | |
33 | |
34 # These are testable on platforms with pkg-config. If you don't have | |
35 # pkg-config, edit the "If you don't have pkg-config" block below (see | |
36 # comments). | |
37 # | |
38 PKGCONFIG_PACKAGES = vamp vamp-hostsdk oggz fishsound mad id3tag fftw3 fftw3f sndfile samplerate lrdf redland rasqal raptor | |
39 | |
40 | |
41 # No pkg-config test for QuickTime. This library is optional, for | |
42 # audio file import. Note that if you compile in support for either | |
43 # or both of libmad and libsndfile as well as for QuickTime, libmad | |
44 # and libsndfile will be used in preference to QuickTime where | |
45 # applicable. For licensing reasons you may not redistribute binaries | |
46 # of Sonic Visualiser built with QuickTime support, except for | |
47 # platforms which include QuickTime as a standard part of the platform | |
48 # (i.e. OS/X). | |
49 # | |
50 #DEFINES += HAVE_QUICKTIME | |
51 #LIBS += -framework QuickTime | |
52 | |
53 | |
54 !system(pkg-config --atleast-pkgconfig-version=0) { | |
55 | |
56 # If you don't have pkg-config, or want to overrule it, comment | |
57 # out (or install) any of the following that you lack. If you | |
58 # have pkg-config, you should be able to ignore all this provided | |
59 # the right symbols are defined in PKGCONFIG_PACKAGES above. | |
60 # | |
61 DEFINES += HAVE_OGGZ # Optional -- to import .ogg files | |
62 DEFINES += HAVE_FISHSOUND # Optional -- to import .ogg files | |
63 DEFINES += HAVE_MAD # Optional -- to import .mp3 files | |
64 DEFINES += HAVE_ID3TAG # Optional -- to import .mp3 file tags | |
65 DEFINES += HAVE_FFTW3F # Optional -- but SV will be slower without it | |
66 DEFINES += HAVE_FFTW3 # Optional -- used by Rubber Band | |
67 # | |
68 LIBS += -loggz -lfishsound | |
69 LIBS += -lmad -lid3tag | |
70 LIBS += -lfftw3f | |
71 LIBS += -lfftw3 | |
72 | |
73 # These ones are mandatory. | |
74 # If you don't have them, you'll have to find them. | |
75 # | |
76 DEFINES += HAVE_VAMP # Required -- for analysis plugins | |
77 DEFINES += HAVE_VAMP_HOSTSDK # Required -- for analysis plugins | |
78 DEFINES += HAVE_SNDFILE # Required -- to import and export .wav files | |
79 DEFINES += HAVE_SAMPLERATE # Required -- for resampling | |
80 DEFINES += HAVE_RASQAL # Required -- for RDF | |
81 DEFINES += HAVE_REDLAND # Required -- for RDF | |
82 # | |
83 LIBS += -lvamp-hostsdk -lsndfile -lrdf -lrasqal -lraptor -lsamplerate | |
84 | |
85 } | |
86 | |
87 ### | |
88 ### END CONFIGURABLE STUFF | |
89 ### | |
90 | |
91 system(pkg-config --atleast-pkgconfig-version=0) { | |
92 | |
93 # If you have pkg-config, this block should locate all packages | |
94 # for you provided they have .pc files and are listed in | |
95 # PKGCONFIG_PACKAGES. | |
96 # | |
97 for(PKG, PKGCONFIG_PACKAGES) { | |
98 contains(SV_UNIT_PACKAGES, $$PKG) { | |
99 system(pkg-config --exists $$PKG) { | |
100 VERSION = $$system(pkg-config --modversion $$PKG) | |
101 PACKAGE_SYMBOL = $$system(echo $$PKG | tr '[a-z-]' '[A-Z_]' | tr '.' '_') | |
102 VERSION_SYMBOL = $$PACKAGE_SYMBOL'_VERSION' | |
103 DEFINES += HAVE_$$PACKAGE_SYMBOL | |
104 QMAKE_CXXFLAGS += -D"'"$$VERSION_SYMBOL='"'$$VERSION'"'"'" | |
105 QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKG) | |
106 LIBS += $$system(pkg-config --libs $$PKG) | |
107 message("Using pkg-config package $$PKG with version $$VERSION") | |
108 } else { | |
109 message("WARNING: Failed to find pkg-config package $$PKG") | |
110 } | |
111 } | |
112 } | |
113 } | |
114 | |
115 contains(SV_UNIT_PACKAGES, oggz) { | |
116 contains(DEFINES, HAVE_OGGZ) { | |
117 contains(DEFINES, HAVE_FISHSOUND) { | |
118 message("Including .ogg file import") | |
119 } else { | |
120 message("WARNING: .ogg file import will not be included") | |
121 } | |
122 } else { | |
123 message("WARNING: .ogg file import will not be included") | |
124 } | |
125 } | |
126 | |
127 contains(SV_UNIT_PACKAGES, mad) { | |
128 contains(DEFINES, HAVE_MAD) { | |
129 message("Including .mp3 file import") | |
130 } else { | |
131 message("WARNING: .mp3 file import will not be included") | |
132 } | |
133 } | |
134 | |
135 contains(SV_UNIT_PACKAGES, id3tag) { | |
136 contains(DEFINES, HAVE_ID3TAG) { | |
137 message("Including .mp3 file tag support") | |
138 } else { | |
139 message("WARNING: .mp3 file tag support will not be included") | |
140 } | |
141 } | |
142 | |
143 contains(SV_UNIT_PACKAGES, fftw3f) { | |
144 contains(DEFINES, HAVE_FFTW3F) { | |
145 message("Using FFTW3f") | |
146 } else { | |
147 message("WARNING: FFTW3f not available, using slower FFT implementation") | |
148 } | |
149 } | |
150 | |
151 contains(SV_UNIT_PACKAGES, vamp):!contains(DEFINES, HAVE_VAMP):error("Vamp plugin API required") | |
152 contains(SV_UNIT_PACKAGES, vamp-hostsdk):!contains(DEFINES, HAVE_VAMP_HOSTSDK):error("Vamp plugin host SDK required") | |
153 contains(SV_UNIT_PACKAGES, sndfile):!contains(DEFINES, HAVE_SNDFILE):error("sndfile library required") | |
154 contains(SV_UNIT_PACKAGES, samplerate):!contains(DEFINES, HAVE_SAMPLERATE):error("libsamplerate required") | |
155 contains(SV_UNIT_PACKAGES, rasqal):!contains(DEFINES, HAVE_RASQAL):error("Rasqal RDF query library required") | |
156 contains(SV_UNIT_PACKAGES, redland):!contains(DEFINES, HAVE_REDLAND):error("Redland RDF datastore required") | |
157 | |
158 VERSION_CFLAGS += -D"'"SVNREV='"'$$system(svnversion -n .)'"'"'" | |
159 | |
160 QMAKE_CXXFLAGS_DEBUG += -DBUILD_DEBUG $$VERSION_CFLAGS | |
161 QMAKE_CXXFLAGS_RELEASE += -DBUILD_RELEASE $$VERSION_CFLAGS | |
162 | |
163 LIBS -= -lpthread | |
164 | |
165 linux-g++ { | |
166 contains(DEFINES, BUILD_STATIC) { | |
167 LIBS += -lFLAC -lxml2 | |
168 } | |
169 } | |
170 | |
171 # Restore dynamic linkage, in case we went static earlier | |
172 linux-g++:LIBS += -Wl,-Bdynamic -lpthread -ldl | |
173 |