Cleanup: trailing space in CMake files
[blender.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_strict_flags()
23
24 if(CMAKE_COMPILER_IS_GNUCC)
25         remove_cc_flag("-Wunused-macros")
26 endif()
27
28 if(WITH_SYSTEM_AUDASPACE)
29
30         set(INC
31                 .
32         )
33
34         set(INC_SYS
35                 ${AUDASPACE_C_INCLUDE_DIRS}
36                 ${AUDASPACE_PY_INCLUDE_DIRS}
37         )
38
39         set(SRC
40                 intern/AUD_Set.cpp
41                 intern/AUD_Set.h
42         )
43
44 if(WITH_PYTHON)
45         list(APPEND INC_SYS
46                 ${PYTHON_INCLUDE_DIRS}
47         )
48         list(APPEND SRC
49                 intern/AUD_PyInit.cpp
50                 intern/AUD_PyInit.h
51         )
52         add_definitions(-DWITH_PYTHON)
53 endif()
54
55 else()
56
57 set(INC
58         .
59         FX
60         intern
61         ../ffmpeg
62 )
63
64 set(INC_SYS
65         ${PTHREADS_INCLUDE_DIRS}
66         ${BOOST_INCLUDE_DIR}
67 )
68
69 set(SRC
70         FX/AUD_AccumulatorFactory.cpp
71         FX/AUD_BandpassCalculator.cpp
72         FX/AUD_BaseIIRFilterReader.cpp
73         FX/AUD_ButterworthCalculator.cpp
74         FX/AUD_ButterworthFactory.cpp
75         FX/AUD_CallbackIIRFilterReader.cpp
76         FX/AUD_DelayFactory.cpp
77         FX/AUD_DelayReader.cpp
78         FX/AUD_DoubleFactory.cpp
79         FX/AUD_DoubleReader.cpp
80         FX/AUD_DynamicIIRFilterFactory.cpp
81         FX/AUD_DynamicIIRFilterReader.cpp
82         FX/AUD_EffectFactory.cpp
83         FX/AUD_EffectReader.cpp
84         FX/AUD_EnvelopeFactory.cpp
85         FX/AUD_FaderFactory.cpp
86         FX/AUD_FaderReader.cpp
87         FX/AUD_HighpassCalculator.cpp
88         FX/AUD_HighpassFactory.cpp
89         FX/AUD_IIRFilterFactory.cpp
90         FX/AUD_IIRFilterReader.cpp
91         FX/AUD_LimiterFactory.cpp
92         FX/AUD_LimiterReader.cpp
93         FX/AUD_LoopFactory.cpp
94         FX/AUD_LoopReader.cpp
95         FX/AUD_LowpassCalculator.cpp
96         FX/AUD_LowpassFactory.cpp
97         FX/AUD_PingPongFactory.cpp
98         FX/AUD_PitchFactory.cpp
99         FX/AUD_PitchReader.cpp
100         FX/AUD_RectifyFactory.cpp
101         FX/AUD_ReverseFactory.cpp
102         FX/AUD_ReverseReader.cpp
103         FX/AUD_SquareFactory.cpp
104         FX/AUD_SumFactory.cpp
105         FX/AUD_SuperposeFactory.cpp
106         FX/AUD_SuperposeReader.cpp
107         FX/AUD_VolumeFactory.cpp
108
109         intern/AUD_3DMath.h
110         intern/AUD_AnimateableProperty.cpp
111         intern/AUD_AnimateableProperty.h
112         intern/AUD_Buffer.cpp
113         intern/AUD_Buffer.h
114         intern/AUD_BufferReader.cpp
115         intern/AUD_BufferReader.h
116         intern/AUD_C-API.cpp
117         intern/AUD_C-API.h
118         intern/AUD_ChannelMapperFactory.cpp
119         intern/AUD_ChannelMapperFactory.h
120         intern/AUD_ChannelMapperReader.cpp
121         intern/AUD_ChannelMapperReader.h
122         intern/AUD_ConverterFactory.cpp
123         intern/AUD_ConverterFactory.h
124         intern/AUD_ConverterFunctions.cpp
125         intern/AUD_ConverterFunctions.h
126         intern/AUD_ConverterReader.cpp
127         intern/AUD_ConverterReader.h
128         intern/AUD_FileFactory.cpp
129         intern/AUD_FileFactory.h
130         intern/AUD_FileWriter.cpp
131         intern/AUD_FileWriter.h
132         intern/AUD_I3DDevice.h
133         intern/AUD_I3DHandle.h
134         intern/AUD_IDevice.h
135         intern/AUD_IFactory.h
136         intern/AUD_IHandle.h
137         intern/AUD_ILockable.h
138         intern/AUD_IReader.h
139         intern/AUD_IWriter.h
140         intern/AUD_JOSResampleFactory.cpp
141         intern/AUD_JOSResampleFactory.h
142         intern/AUD_JOSResampleReader.cpp
143         intern/AUD_JOSResampleReader.h
144         intern/AUD_LinearResampleFactory.cpp
145         intern/AUD_LinearResampleFactory.h
146         intern/AUD_LinearResampleReader.cpp
147         intern/AUD_LinearResampleReader.h
148         intern/AUD_Mixer.cpp
149         intern/AUD_Mixer.h
150         intern/AUD_MixerFactory.cpp
151         intern/AUD_MixerFactory.h
152         intern/AUD_MutexLock.h
153         intern/AUD_NULLDevice.cpp
154         intern/AUD_NULLDevice.h
155         intern/AUD_PyInit.h
156         intern/AUD_ReadDevice.cpp
157         intern/AUD_ReadDevice.h
158         intern/AUD_ResampleFactory.h
159         intern/AUD_ResampleReader.cpp
160         intern/AUD_ResampleReader.h
161         intern/AUD_Sequencer.cpp
162         intern/AUD_Sequencer.h
163         intern/AUD_SequencerEntry.cpp
164         intern/AUD_SequencerEntry.h
165         intern/AUD_SequencerFactory.cpp
166         intern/AUD_SequencerFactory.h
167         intern/AUD_SequencerHandle.cpp
168         intern/AUD_SequencerHandle.h
169         intern/AUD_SequencerReader.cpp
170         intern/AUD_SequencerReader.h
171         intern/AUD_Set.cpp
172         intern/AUD_Set.h
173         intern/AUD_SilenceFactory.cpp
174         intern/AUD_SilenceFactory.h
175         intern/AUD_SilenceReader.cpp
176         intern/AUD_SilenceReader.h
177         intern/AUD_SinusFactory.cpp
178         intern/AUD_SinusFactory.h
179         intern/AUD_SinusReader.cpp
180         intern/AUD_SinusReader.h
181         intern/AUD_SoftwareDevice.cpp
182         intern/AUD_SoftwareDevice.h
183         intern/AUD_Space.h
184         intern/AUD_StreamBufferFactory.cpp
185         intern/AUD_StreamBufferFactory.h
186
187         FX/AUD_AccumulatorFactory.h
188         FX/AUD_BandpassCalculator.h
189         FX/AUD_BaseIIRFilterReader.h
190         FX/AUD_ButterworthCalculator.h
191         FX/AUD_ButterworthFactory.h
192         FX/AUD_CallbackIIRFilterReader.h
193         FX/AUD_DelayFactory.h
194         FX/AUD_DelayReader.h
195         FX/AUD_DoubleFactory.h
196         FX/AUD_DoubleReader.h
197         FX/AUD_IDynamicIIRFilterCalculator.h
198         FX/AUD_DynamicIIRFilterFactory.h
199         FX/AUD_DynamicIIRFilterReader.h
200         FX/AUD_EffectFactory.h
201         FX/AUD_EffectReader.h
202         FX/AUD_EnvelopeFactory.h
203         FX/AUD_FaderFactory.h
204         FX/AUD_FaderReader.h
205         FX/AUD_HighpassCalculator.h
206         FX/AUD_HighpassFactory.h
207         FX/AUD_IIRFilterFactory.h
208         FX/AUD_IIRFilterReader.h
209         FX/AUD_LimiterFactory.h
210         FX/AUD_LimiterReader.h
211         FX/AUD_LoopFactory.h
212         FX/AUD_LoopReader.h
213         FX/AUD_LowpassCalculator.h
214         FX/AUD_LowpassFactory.h
215         FX/AUD_PingPongFactory.h
216         FX/AUD_PitchFactory.h
217         FX/AUD_PitchReader.h
218         FX/AUD_RectifyFactory.h
219         FX/AUD_ReverseFactory.h
220         FX/AUD_ReverseReader.h
221         FX/AUD_SquareFactory.h
222         FX/AUD_SumFactory.h
223         FX/AUD_SuperposeFactory.h
224         FX/AUD_SuperposeReader.h
225         FX/AUD_VolumeFactory.h
226 )
227
228 if(WITH_CODEC_FFMPEG)
229         add_definitions(-DWITH_FFMPEG)
230         list(APPEND INC
231                 ffmpeg
232         )
233         list(APPEND INC_SYS
234                 ${FFMPEG_INCLUDE_DIRS}
235         )
236         list(APPEND SRC
237                 ffmpeg/AUD_FFMPEGFactory.cpp
238                 ffmpeg/AUD_FFMPEGReader.cpp
239                 ffmpeg/AUD_FFMPEGWriter.cpp
240
241                 ffmpeg/AUD_FFMPEGFactory.h
242                 ffmpeg/AUD_FFMPEGReader.h
243                 ffmpeg/AUD_FFMPEGWriter.h
244         )
245
246         remove_strict_flags_file(
247                 ffmpeg/AUD_FFMPEGFactory.cpp
248                 ffmpeg/AUD_FFMPEGReader.cpp
249                 ffmpeg/AUD_FFMPEGWriter.cpp
250         )
251 endif()
252
253 if(WITH_SDL)
254         add_definitions(-DWITH_SDL)
255         list(APPEND INC
256                 SDL
257         )
258         list(APPEND INC_SYS
259                 ${SDL_INCLUDE_DIR}
260         )
261         list(APPEND SRC
262                 SDL/AUD_SDLDevice.cpp
263
264                 SDL/AUD_SDLDevice.h
265         )
266 endif()
267
268 if(WITH_OPENAL)
269         add_definitions(-DWITH_OPENAL)
270         list(APPEND INC
271                 OpenAL
272         )
273         list(APPEND INC_SYS
274                 ${OPENAL_INCLUDE_DIR}
275         )
276         list(APPEND SRC
277                 OpenAL/AUD_OpenALDevice.cpp
278
279                 OpenAL/AUD_OpenALDevice.h
280         )
281 endif()
282
283 if(WITH_JACK)
284         add_definitions(-DWITH_JACK)
285         list(APPEND INC
286                 jack
287         )
288         list(APPEND INC_SYS
289                 ${JACK_INCLUDE_DIRS}
290         )
291         list(APPEND SRC
292                 jack/AUD_JackDevice.cpp
293                 jack/AUD_JackLibrary.cpp
294
295                 jack/AUD_JackDevice.h
296                 jack/AUD_JackLibrary.h
297         )
298
299         if(WITH_JACK_DYNLOAD)
300                 add_definitions(-DWITH_JACK_DYNLOAD)
301         endif()
302 endif()
303
304 if(WITH_CODEC_SNDFILE)
305         add_definitions(-DWITH_SNDFILE)
306         list(APPEND INC
307                 sndfile
308         )
309         list(APPEND INC_SYS
310                 ${SNDFILE_INCLUDE_DIRS}
311         )
312         list(APPEND SRC
313                 sndfile/AUD_SndFileFactory.cpp
314                 sndfile/AUD_SndFileReader.cpp
315                 sndfile/AUD_SndFileWriter.cpp
316
317                 sndfile/AUD_SndFileFactory.h
318                 sndfile/AUD_SndFileReader.h
319                 sndfile/AUD_SndFileWriter.h
320         )
321 endif()
322
323 if(WITH_FFTW3 AND FALSE)
324         add_definitions(-DWITH_FFTW3)
325         list(APPEND INC
326                 fftw
327         )
328         list(APPEND INC_SYS
329                 ${FFTW3_INCLUDE_DIRS}
330         )
331         list(APPEND SRC
332                 fftw/AUD_BandPassFactory.cpp
333                 fftw/AUD_BandPassReader.cpp
334
335                 fftw/AUD_BandPassFactory.h
336                 fftw/AUD_BandPassReader.h
337         )
338 endif()
339
340 if(WITH_PYTHON)
341         list(APPEND INC
342                 Python
343         )
344         list(APPEND INC_SYS
345                 ${PYTHON_INCLUDE_DIRS}
346         )
347         list(APPEND SRC
348                 Python/AUD_PyAPI.cpp
349
350                 Python/AUD_PyAPI.h
351         )
352         add_definitions(-DWITH_PYTHON)
353 endif()
354 endif()
355
356 blender_add_lib(bf_intern_audaspace "${SRC}" "${INC}" "${INC_SYS}")