3D Audio GSoC:
[blender.git] / intern / audaspace / CMakeLists.txt
1 # $Id$
2 # ***** BEGIN LGPL LICENSE BLOCK *****
3 #
4 # Copyright 2009 Jrg Hermann Mller
5 #
6 # This file is part of AudaSpace.
7 #
8 # AudaSpace is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Lesser General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # AudaSpace is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU Lesser General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public License
19 # along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
20 #
21 # ***** END LGPL LICENSE BLOCK *****
22
23 set(INC
24         .
25         intern
26         FX
27         SRC
28         ../ffmpeg
29 )
30
31 set(INC_SYS
32         ${PTHREADS_INCLUDE_DIRS}
33 )
34
35 set(SRC
36         FX/AUD_AccumulatorFactory.cpp
37         FX/AUD_BaseIIRFilterReader.cpp
38         FX/AUD_ButterworthFactory.cpp
39         FX/AUD_CallbackIIRFilterReader.cpp
40         FX/AUD_DelayFactory.cpp
41         FX/AUD_DelayReader.cpp
42         FX/AUD_DoubleFactory.cpp
43         FX/AUD_DoubleReader.cpp
44         FX/AUD_EffectFactory.cpp
45         FX/AUD_EffectReader.cpp
46         FX/AUD_EnvelopeFactory.cpp
47         FX/AUD_FaderFactory.cpp
48         FX/AUD_FaderReader.cpp
49         FX/AUD_HighpassFactory.cpp
50         FX/AUD_IIRFilterFactory.cpp
51         FX/AUD_IIRFilterReader.cpp
52         FX/AUD_LimiterFactory.cpp
53         FX/AUD_LimiterReader.cpp
54         FX/AUD_LoopFactory.cpp
55         FX/AUD_LoopReader.cpp
56         FX/AUD_LowpassFactory.cpp
57         FX/AUD_PingPongFactory.cpp
58         FX/AUD_PitchFactory.cpp
59         FX/AUD_PitchReader.cpp
60         FX/AUD_RectifyFactory.cpp
61         FX/AUD_ReverseFactory.cpp
62         FX/AUD_ReverseReader.cpp
63         FX/AUD_SquareFactory.cpp
64         FX/AUD_SumFactory.cpp
65         FX/AUD_SuperposeFactory.cpp
66         FX/AUD_SuperposeReader.cpp
67         FX/AUD_VolumeFactory.cpp
68         intern/AUD_3DMath.h
69         intern/AUD_Buffer.cpp
70         intern/AUD_Buffer.h
71         intern/AUD_BufferReader.cpp
72         intern/AUD_BufferReader.h
73         intern/AUD_C-API.cpp
74         intern/AUD_C-API.h
75         intern/AUD_ChannelMapperFactory.cpp
76         intern/AUD_ChannelMapperFactory.h
77         intern/AUD_ChannelMapperReader.cpp
78         intern/AUD_ChannelMapperReader.h
79         intern/AUD_ConverterFactory.cpp
80         intern/AUD_ConverterFactory.h
81         intern/AUD_ConverterFunctions.cpp
82         intern/AUD_ConverterFunctions.h
83         intern/AUD_ConverterReader.cpp
84         intern/AUD_ConverterReader.h
85         intern/AUD_FileFactory.cpp
86         intern/AUD_FileFactory.h
87         intern/AUD_I3DDevice.h
88         intern/AUD_I3DHandle.h
89         intern/AUD_IDevice.h
90         intern/AUD_IFactory.h
91         intern/AUD_IHandle.h
92         intern/AUD_IReader.h
93         intern/AUD_LinearResampleFactory.cpp
94         intern/AUD_LinearResampleFactory.h
95         intern/AUD_LinearResampleReader.cpp
96         intern/AUD_LinearResampleReader.h
97         intern/AUD_Mixer.cpp
98         intern/AUD_Mixer.h
99         intern/AUD_MixerFactory.cpp
100         intern/AUD_MixerFactory.h
101         intern/AUD_NULLDevice.cpp
102         intern/AUD_NULLDevice.h
103         intern/AUD_PyInit.h
104         intern/AUD_ReadDevice.cpp
105         intern/AUD_ReadDevice.h
106         intern/AUD_Reference.h
107         intern/AUD_ReferenceHandler.cpp
108         intern/AUD_ResampleReader.cpp
109         intern/AUD_ResampleReader.h
110         intern/AUD_SequencerFactory.cpp
111         intern/AUD_SequencerFactory.h
112         intern/AUD_SequencerReader.cpp
113         intern/AUD_SequencerReader.h
114         intern/AUD_SilenceFactory.cpp
115         intern/AUD_SilenceFactory.h
116         intern/AUD_SilenceReader.cpp
117         intern/AUD_SilenceReader.h
118         intern/AUD_SinusFactory.cpp
119         intern/AUD_SinusFactory.h
120         intern/AUD_SinusReader.cpp
121         intern/AUD_SinusReader.h
122         intern/AUD_SoftwareDevice.cpp
123         intern/AUD_SoftwareDevice.h
124         intern/AUD_Space.h
125         intern/AUD_StreamBufferFactory.cpp
126         intern/AUD_StreamBufferFactory.h
127
128         FX/AUD_AccumulatorFactory.h
129         FX/AUD_BaseIIRFilterReader.h
130         FX/AUD_ButterworthFactory.h
131         FX/AUD_CallbackIIRFilterReader.h
132         FX/AUD_DelayFactory.h
133         FX/AUD_DelayReader.h
134         FX/AUD_DoubleFactory.h
135         FX/AUD_DoubleReader.h
136         FX/AUD_EffectFactory.h
137         FX/AUD_EffectReader.h
138         FX/AUD_EnvelopeFactory.h
139         FX/AUD_FaderFactory.h
140         FX/AUD_FaderReader.h
141         FX/AUD_HighpassFactory.h
142         FX/AUD_IIRFilterFactory.h
143         FX/AUD_IIRFilterReader.h
144         FX/AUD_LimiterFactory.h
145         FX/AUD_LimiterReader.h
146         FX/AUD_LoopFactory.h
147         FX/AUD_LoopReader.h
148         FX/AUD_LowpassFactory.h
149         FX/AUD_PingPongFactory.h
150         FX/AUD_PitchFactory.h
151         FX/AUD_PitchReader.h
152         FX/AUD_RectifyFactory.h
153         FX/AUD_ReverseFactory.h
154         FX/AUD_ReverseReader.h
155         FX/AUD_SquareFactory.h
156         FX/AUD_SumFactory.h
157         FX/AUD_SuperposeFactory.h
158         FX/AUD_SuperposeReader.h
159         FX/AUD_VolumeFactory.h
160 )
161
162 if(WITH_CODEC_FFMPEG)
163         add_definitions(-DWITH_FFMPEG)
164         list(APPEND INC ffmpeg)
165         list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
166         list(APPEND SRC
167                 ffmpeg/AUD_FFMPEGFactory.cpp
168                 ffmpeg/AUD_FFMPEGReader.cpp
169
170                 ffmpeg/AUD_FFMPEGFactory.h
171                 ffmpeg/AUD_FFMPEGReader.h
172         )
173 endif()
174
175 if(WITH_SDL)
176         add_definitions(-DWITH_SDL)
177         list(APPEND INC SDL)
178         list(APPEND INC_SYS ${SDL_INCLUDE_DIR})
179         list(APPEND SRC
180                 SDL/AUD_SDLDevice.cpp
181
182                 SDL/AUD_SDLDevice.h
183         )
184 endif()
185
186 if(WITH_OPENAL)
187         add_definitions(-DWITH_OPENAL)
188         list(APPEND INC OpenAL)
189         list(APPEND INC_SYS ${OPENAL_INCLUDE_DIR})
190         list(APPEND SRC
191                 OpenAL/AUD_OpenALDevice.cpp
192
193                 OpenAL/AUD_OpenALDevice.h
194         )
195 endif()
196
197 if(WITH_JACK)
198         add_definitions(-DWITH_JACK)
199         list(APPEND INC jack)
200         list(APPEND INC_SYS ${JACK_INCLUDE_DIRS})
201         list(APPEND SRC
202                 jack/AUD_JackDevice.cpp
203
204                 jack/AUD_JackDevice.h
205         )       
206 endif()
207
208 if(WITH_CODEC_SNDFILE)
209         add_definitions(-DWITH_SNDFILE)
210         list(APPEND INC sndfile)
211         list(APPEND INC_SYS ${SNDFILE_INCLUDE_DIRS})
212         list(APPEND SRC
213                 sndfile/AUD_SndFileFactory.cpp
214                 sndfile/AUD_SndFileReader.cpp
215
216                 sndfile/AUD_SndFileFactory.h
217                 sndfile/AUD_SndFileReader.h
218         )
219 endif()
220
221 if(WITH_SAMPLERATE)
222         add_definitions(-DWITH_SAMPLERATE)
223         list(APPEND INC_SYS ${SAMPLERATE_INCLUDE_DIRS})
224         list(APPEND SRC
225                 SRC/AUD_SRCResampleFactory.cpp
226                 SRC/AUD_SRCResampleReader.cpp
227
228                 SRC/AUD_SRCResampleFactory.h
229                 SRC/AUD_SRCResampleReader.h
230         )
231 endif()
232
233 if(WITH_FFTW3 AND FALSE)
234         add_definitions(-DWITH_FFTW3)
235         list(APPEND INC fftw)
236         list(APPEND INC_SYS ${FFTW3_INCLUDE_DIRS})
237         list(APPEND SRC
238                 fftw/AUD_BandPassFactory.cpp
239                 fftw/AUD_BandPassReader.cpp
240
241                 fftw/AUD_BandPassFactory.h
242                 fftw/AUD_BandPassReader.h
243         )
244 endif()
245
246 if(WITH_PYTHON)
247         list(APPEND INC Python)
248         list(APPEND INC_SYS ${PYTHON_INCLUDE_DIRS})
249         list(APPEND SRC
250                 Python/AUD_PyAPI.cpp
251
252                 Python/AUD_PyAPI.h
253         )
254         add_definitions(-DWITH_PYTHON)
255 endif()
256
257 blender_add_lib(bf_intern_audaspace "${SRC}" "${INC}" "${INC_SYS}")