Audaspace: use standalone library.
[blender-staging.git] / intern / audaspace / CMakeLists.txt
1 # ***** BEGIN LGPL LICENSE BLOCK *****
2 #
3 # Copyright 2009 Jrg Hermann Mller
4 #
5 # This file is part of AudaSpace.
6 #
7 # AudaSpace is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # AudaSpace is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
19 #
20 # ***** END LGPL LICENSE BLOCK *****
21
22 remove_extra_strict_flags()
23
24 if(WITH_EXTERNAL_AUDASPACE)
25
26         set(INC
27                 .
28         )
29
30         set(INC_SYS
31                 ${CAUDASPACE_INCLUDE_DIRS}
32                 ${PYAUDASPACE_INCLUDE_DIRS}
33         )
34
35         set(SRC
36                 intern/AUD_Set.cpp
37                 intern/AUD_Set.h
38         )
39
40 if(WITH_PYTHON)
41         list(APPEND INC_SYS
42                 ${PYTHON_INCLUDE_DIRS}
43         )
44         list(APPEND SRC
45                 intern/AUD_PyInit.cpp
46                 intern/AUD_PyInit.h
47         )
48         add_definitions(-DWITH_PYTHON)
49 endif()
50
51 else()
52
53 set(INC
54         .
55         FX
56         intern
57         ../ffmpeg
58 )
59
60 set(INC_SYS
61         ${PTHREADS_INCLUDE_DIRS}
62         ${BOOST_INCLUDE_DIR}
63 )
64
65 set(SRC
66         FX/AUD_AccumulatorFactory.cpp
67         FX/AUD_BandpassCalculator.cpp
68         FX/AUD_BaseIIRFilterReader.cpp
69         FX/AUD_ButterworthCalculator.cpp
70         FX/AUD_ButterworthFactory.cpp
71         FX/AUD_CallbackIIRFilterReader.cpp
72         FX/AUD_DelayFactory.cpp
73         FX/AUD_DelayReader.cpp
74         FX/AUD_DoubleFactory.cpp
75         FX/AUD_DoubleReader.cpp
76         FX/AUD_DynamicIIRFilterFactory.cpp
77         FX/AUD_DynamicIIRFilterReader.cpp
78         FX/AUD_EffectFactory.cpp
79         FX/AUD_EffectReader.cpp
80         FX/AUD_EnvelopeFactory.cpp
81         FX/AUD_FaderFactory.cpp
82         FX/AUD_FaderReader.cpp
83         FX/AUD_HighpassCalculator.cpp
84         FX/AUD_HighpassFactory.cpp
85         FX/AUD_IIRFilterFactory.cpp
86         FX/AUD_IIRFilterReader.cpp
87         FX/AUD_LimiterFactory.cpp
88         FX/AUD_LimiterReader.cpp
89         FX/AUD_LoopFactory.cpp
90         FX/AUD_LoopReader.cpp
91         FX/AUD_LowpassCalculator.cpp
92         FX/AUD_LowpassFactory.cpp
93         FX/AUD_PingPongFactory.cpp
94         FX/AUD_PitchFactory.cpp
95         FX/AUD_PitchReader.cpp
96         FX/AUD_RectifyFactory.cpp
97         FX/AUD_ReverseFactory.cpp
98         FX/AUD_ReverseReader.cpp
99         FX/AUD_SquareFactory.cpp
100         FX/AUD_SumFactory.cpp
101         FX/AUD_SuperposeFactory.cpp
102         FX/AUD_SuperposeReader.cpp
103         FX/AUD_VolumeFactory.cpp
104
105         intern/AUD_3DMath.h
106         intern/AUD_AnimateableProperty.cpp
107         intern/AUD_AnimateableProperty.h
108         intern/AUD_Buffer.cpp
109         intern/AUD_Buffer.h
110         intern/AUD_BufferReader.cpp
111         intern/AUD_BufferReader.h
112         intern/AUD_C-API.cpp
113         intern/AUD_C-API.h
114         intern/AUD_ChannelMapperFactory.cpp
115         intern/AUD_ChannelMapperFactory.h
116         intern/AUD_ChannelMapperReader.cpp
117         intern/AUD_ChannelMapperReader.h
118         intern/AUD_ConverterFactory.cpp
119         intern/AUD_ConverterFactory.h
120         intern/AUD_ConverterFunctions.cpp
121         intern/AUD_ConverterFunctions.h
122         intern/AUD_ConverterReader.cpp
123         intern/AUD_ConverterReader.h
124         intern/AUD_FileFactory.cpp
125         intern/AUD_FileFactory.h
126         intern/AUD_FileWriter.cpp
127         intern/AUD_FileWriter.h
128         intern/AUD_I3DDevice.h
129         intern/AUD_I3DHandle.h
130         intern/AUD_IDevice.h
131         intern/AUD_IFactory.h
132         intern/AUD_IHandle.h
133         intern/AUD_ILockable.h
134         intern/AUD_IReader.h
135         intern/AUD_IWriter.h
136         intern/AUD_JOSResampleFactory.cpp
137         intern/AUD_JOSResampleFactory.h
138         intern/AUD_JOSResampleReader.cpp
139         intern/AUD_JOSResampleReader.h
140         intern/AUD_LinearResampleFactory.cpp
141         intern/AUD_LinearResampleFactory.h
142         intern/AUD_LinearResampleReader.cpp
143         intern/AUD_LinearResampleReader.h
144         intern/AUD_Mixer.cpp
145         intern/AUD_Mixer.h
146         intern/AUD_MixerFactory.cpp
147         intern/AUD_MixerFactory.h
148         intern/AUD_MutexLock.h
149         intern/AUD_NULLDevice.cpp
150         intern/AUD_NULLDevice.h
151         intern/AUD_PyInit.h
152         intern/AUD_ReadDevice.cpp
153         intern/AUD_ReadDevice.h
154         intern/AUD_ResampleFactory.h
155         intern/AUD_ResampleReader.cpp
156         intern/AUD_ResampleReader.h
157         intern/AUD_Sequencer.cpp
158         intern/AUD_Sequencer.h
159         intern/AUD_SequencerEntry.cpp
160         intern/AUD_SequencerEntry.h
161         intern/AUD_SequencerFactory.cpp
162         intern/AUD_SequencerFactory.h
163         intern/AUD_SequencerHandle.cpp
164         intern/AUD_SequencerHandle.h
165         intern/AUD_SequencerReader.cpp
166         intern/AUD_SequencerReader.h
167         intern/AUD_SilenceFactory.cpp
168         intern/AUD_SilenceFactory.h
169         intern/AUD_SilenceReader.cpp
170         intern/AUD_SilenceReader.h
171         intern/AUD_SinusFactory.cpp
172         intern/AUD_SinusFactory.h
173         intern/AUD_SinusReader.cpp
174         intern/AUD_SinusReader.h
175         intern/AUD_SoftwareDevice.cpp
176         intern/AUD_SoftwareDevice.h
177         intern/AUD_Space.h
178         intern/AUD_StreamBufferFactory.cpp
179         intern/AUD_StreamBufferFactory.h
180
181         FX/AUD_AccumulatorFactory.h
182         FX/AUD_BandpassCalculator.h
183         FX/AUD_BaseIIRFilterReader.h
184         FX/AUD_ButterworthCalculator.h
185         FX/AUD_ButterworthFactory.h
186         FX/AUD_CallbackIIRFilterReader.h
187         FX/AUD_DelayFactory.h
188         FX/AUD_DelayReader.h
189         FX/AUD_DoubleFactory.h
190         FX/AUD_DoubleReader.h
191         FX/AUD_IDynamicIIRFilterCalculator.h
192         FX/AUD_DynamicIIRFilterFactory.h
193         FX/AUD_DynamicIIRFilterReader.h
194         FX/AUD_EffectFactory.h
195         FX/AUD_EffectReader.h
196         FX/AUD_EnvelopeFactory.h
197         FX/AUD_FaderFactory.h
198         FX/AUD_FaderReader.h
199         FX/AUD_HighpassCalculator.h
200         FX/AUD_HighpassFactory.h
201         FX/AUD_IIRFilterFactory.h
202         FX/AUD_IIRFilterReader.h
203         FX/AUD_LimiterFactory.h
204         FX/AUD_LimiterReader.h
205         FX/AUD_LoopFactory.h
206         FX/AUD_LoopReader.h
207         FX/AUD_LowpassCalculator.h
208         FX/AUD_LowpassFactory.h
209         FX/AUD_PingPongFactory.h
210         FX/AUD_PitchFactory.h
211         FX/AUD_PitchReader.h
212         FX/AUD_RectifyFactory.h
213         FX/AUD_ReverseFactory.h
214         FX/AUD_ReverseReader.h
215         FX/AUD_SquareFactory.h
216         FX/AUD_SumFactory.h
217         FX/AUD_SuperposeFactory.h
218         FX/AUD_SuperposeReader.h
219         FX/AUD_VolumeFactory.h
220 )
221
222 if(WITH_CODEC_FFMPEG)
223         add_definitions(-DWITH_FFMPEG)
224         list(APPEND INC
225                 ffmpeg
226         )
227         list(APPEND INC_SYS
228                 ${FFMPEG_INCLUDE_DIRS}
229         )
230         list(APPEND SRC
231                 ffmpeg/AUD_FFMPEGFactory.cpp
232                 ffmpeg/AUD_FFMPEGReader.cpp
233                 ffmpeg/AUD_FFMPEGWriter.cpp
234
235                 ffmpeg/AUD_FFMPEGFactory.h
236                 ffmpeg/AUD_FFMPEGReader.h
237                 ffmpeg/AUD_FFMPEGWriter.h
238         )
239
240         remove_strict_flags_file(
241                 ffmpeg/AUD_FFMPEGFactory.cpp
242                 ffmpeg/AUD_FFMPEGReader.cpp
243                 ffmpeg/AUD_FFMPEGWriter.cpp
244         )
245 endif()
246
247 if(WITH_SDL)
248         add_definitions(-DWITH_SDL)
249         list(APPEND INC
250                 SDL
251         )
252         list(APPEND INC_SYS
253                 ${SDL_INCLUDE_DIR}
254         )
255         list(APPEND SRC
256                 SDL/AUD_SDLDevice.cpp
257
258                 SDL/AUD_SDLDevice.h
259         )
260 endif()
261
262 if(WITH_OPENAL)
263         add_definitions(-DWITH_OPENAL)
264         list(APPEND INC
265                 OpenAL
266         )
267         list(APPEND INC_SYS
268                 ${OPENAL_INCLUDE_DIR}
269         )
270         list(APPEND SRC
271                 OpenAL/AUD_OpenALDevice.cpp
272
273                 OpenAL/AUD_OpenALDevice.h
274         )
275 endif()
276
277 if(WITH_JACK)
278         add_definitions(-DWITH_JACK)
279         list(APPEND INC
280                 jack
281         )
282         list(APPEND INC_SYS
283                 ${JACK_INCLUDE_DIRS}
284         )
285         list(APPEND SRC
286                 jack/AUD_JackDevice.cpp
287                 jack/AUD_JackLibrary.cpp
288
289                 jack/AUD_JackDevice.h
290                 jack/AUD_JackLibrary.h
291         )       
292
293         if(WITH_JACK_DYNLOAD)
294                 add_definitions(-DWITH_JACK_DYNLOAD)
295         endif()
296 endif()
297
298 if(WITH_CODEC_SNDFILE)
299         add_definitions(-DWITH_SNDFILE)
300         list(APPEND INC
301                 sndfile
302         )
303         list(APPEND INC_SYS
304                 ${SNDFILE_INCLUDE_DIRS}
305         )
306         list(APPEND SRC
307                 sndfile/AUD_SndFileFactory.cpp
308                 sndfile/AUD_SndFileReader.cpp
309                 sndfile/AUD_SndFileWriter.cpp
310
311                 sndfile/AUD_SndFileFactory.h
312                 sndfile/AUD_SndFileReader.h
313                 sndfile/AUD_SndFileWriter.h
314         )
315 endif()
316
317 if(WITH_FFTW3 AND FALSE)
318         add_definitions(-DWITH_FFTW3)
319         list(APPEND INC
320                 fftw
321         )
322         list(APPEND INC_SYS
323                 ${FFTW3_INCLUDE_DIRS}
324         )
325         list(APPEND SRC
326                 fftw/AUD_BandPassFactory.cpp
327                 fftw/AUD_BandPassReader.cpp
328
329                 fftw/AUD_BandPassFactory.h
330                 fftw/AUD_BandPassReader.h
331         )
332 endif()
333
334 if(WITH_PYTHON)
335         list(APPEND INC
336                 Python
337         )
338         list(APPEND INC_SYS
339                 ${PYTHON_INCLUDE_DIRS}
340         )
341         list(APPEND SRC
342                 Python/AUD_PyAPI.cpp
343
344                 Python/AUD_PyAPI.h
345         )
346         add_definitions(-DWITH_PYTHON)
347 endif()
348 endif()
349
350 blender_add_lib(bf_intern_audaspace "${SRC}" "${INC}" "${INC_SYS}")