WITH_SAMPLERATE option for cmake, without this playback wont behave right so this...
[blender-staging.git] / intern / audaspace / CMakeLists.txt
1 # $Id$
2 # ***** BEGIN LGPL LICENSE BLOCK *****
3 #
4 # Copyright 2009 Jörg Hermann Müller
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 SRC
27         ${PTHREADS_INC}
28         ${LIBSAMPLERATE_INC}
29 )
30
31 SET(SRC
32         FX/AUD_AccumulatorFactory.cpp
33         FX/AUD_BaseIIRFilterReader.cpp
34         FX/AUD_ButterworthFactory.cpp
35         FX/AUD_CallbackIIRFilterReader.cpp
36         FX/AUD_DelayFactory.cpp
37         FX/AUD_DelayReader.cpp
38         FX/AUD_DoubleFactory.cpp
39         FX/AUD_DoubleReader.cpp
40         FX/AUD_EffectFactory.cpp
41         FX/AUD_EffectReader.cpp
42         FX/AUD_EnvelopeFactory.cpp
43         FX/AUD_FaderFactory.cpp
44         FX/AUD_FaderReader.cpp
45         FX/AUD_HighpassFactory.cpp
46         FX/AUD_IIRFilterFactory.cpp
47         FX/AUD_IIRFilterReader.cpp
48         FX/AUD_LimiterFactory.cpp
49         FX/AUD_LimiterReader.cpp
50         FX/AUD_LoopFactory.cpp
51         FX/AUD_LoopReader.cpp
52         FX/AUD_LowpassFactory.cpp
53         FX/AUD_PingPongFactory.cpp
54         FX/AUD_PitchFactory.cpp
55         FX/AUD_PitchReader.cpp
56         FX/AUD_RectifyFactory.cpp
57         FX/AUD_ReverseFactory.cpp
58         FX/AUD_ReverseReader.cpp
59         FX/AUD_SquareFactory.cpp
60         FX/AUD_SumFactory.cpp
61         FX/AUD_SuperposeFactory.cpp
62         FX/AUD_SuperposeReader.cpp
63         FX/AUD_VolumeFactory.cpp
64         intern/AUD_3DMath.h
65         intern/AUD_Buffer.cpp
66         intern/AUD_Buffer.h
67         intern/AUD_BufferReader.cpp
68         intern/AUD_BufferReader.h
69         intern/AUD_C-API.cpp
70         intern/AUD_C-API.h
71         intern/AUD_ChannelMapperFactory.cpp
72         intern/AUD_ChannelMapperFactory.h
73         intern/AUD_ChannelMapperReader.cpp
74         intern/AUD_ChannelMapperReader.h
75         intern/AUD_ConverterFactory.cpp
76         intern/AUD_ConverterFactory.h
77         intern/AUD_ConverterFunctions.cpp
78         intern/AUD_ConverterFunctions.h
79         intern/AUD_ConverterReader.cpp
80         intern/AUD_ConverterReader.h
81         intern/AUD_DefaultMixer.cpp
82         intern/AUD_DefaultMixer.h
83         intern/AUD_FileFactory.cpp
84         intern/AUD_FileFactory.h
85         intern/AUD_I3DDevice.h
86         intern/AUD_IDevice.h
87         intern/AUD_IFactory.h
88         intern/AUD_IReader.h
89         intern/AUD_LinearResampleFactory.cpp
90         intern/AUD_LinearResampleFactory.h
91         intern/AUD_LinearResampleReader.cpp
92         intern/AUD_LinearResampleReader.h
93         intern/AUD_Mixer.cpp
94         intern/AUD_Mixer.h
95         intern/AUD_MixerFactory.cpp
96         intern/AUD_MixerFactory.h
97         intern/AUD_NULLDevice.cpp
98         intern/AUD_NULLDevice.h
99         intern/AUD_PyInit.h
100         intern/AUD_ReadDevice.cpp
101         intern/AUD_ReadDevice.h
102         intern/AUD_Reference.h
103         intern/AUD_ResampleFactory.h
104         intern/AUD_SequencerFactory.cpp
105         intern/AUD_SequencerFactory.h
106         intern/AUD_SequencerReader.cpp
107         intern/AUD_SequencerReader.h
108         intern/AUD_SilenceFactory.cpp
109         intern/AUD_SilenceFactory.h
110         intern/AUD_SilenceReader.cpp
111         intern/AUD_SilenceReader.h
112         intern/AUD_SinusFactory.cpp
113         intern/AUD_SinusFactory.h
114         intern/AUD_SinusReader.cpp
115         intern/AUD_SinusReader.h
116         intern/AUD_SoftwareDevice.cpp
117         intern/AUD_SoftwareDevice.h
118         intern/AUD_Space.h
119         intern/AUD_StreamBufferFactory.cpp
120         intern/AUD_StreamBufferFactory.h
121 )
122
123 IF(WITH_FFMPEG)
124         ADD_DEFINITIONS(-DWITH_FFMPEG)
125         LIST(APPEND INC ffmpeg ${FFMPEG_INC})
126         SET(FFMPEGSRC
127                 ffmpeg/AUD_FFMPEGFactory.cpp
128                 ffmpeg/AUD_FFMPEGReader.cpp
129         )
130 ENDIF(WITH_FFMPEG)
131
132 IF(WITH_SDL)
133         ADD_DEFINITIONS(-DWITH_SDL)
134         LIST(APPEND INC SDL ${SDL_INCLUDE_DIR})
135         SET(SDLSRC
136                 SDL/AUD_SDLDevice.cpp
137         )
138 ENDIF(WITH_SDL)
139
140 IF(WITH_OPENAL)
141         ADD_DEFINITIONS(-DWITH_OPENAL)
142         LIST(APPEND INC OpenAL ${OPENAL_INCLUDE_DIR})
143         SET(OPENALSRC
144                 OpenAL/AUD_OpenALDevice.cpp
145         )       
146 ENDIF(WITH_OPENAL)
147
148 IF(WITH_JACK)
149         ADD_DEFINITIONS(-DWITH_JACK)
150         LIST(APPEND INC jack ${JACK_INC})
151         SET(JACKSRC
152                 jack/AUD_JackDevice.cpp
153         )       
154 ENDIF(WITH_JACK)
155
156 IF(WITH_SNDFILE)
157         ADD_DEFINITIONS(-DWITH_SNDFILE)
158         LIST(APPEND INC sndfile ${SNDFILE_INC})
159         SET(SNDFILESRC
160                 sndfile/AUD_SndFileFactory.cpp
161                 sndfile/AUD_SndFileReader.cpp
162         )
163 ENDIF(WITH_SNDFILE)
164
165 IF(WITH_SAMPLERATE)
166         ADD_DEFINITIONS(-DWITH_SAMPLERATE)
167         SET(SRCFILESRC
168                 SRC/AUD_SRCResampleFactory.cpp
169                 SRC/AUD_SRCResampleReader.cpp
170         )
171 ENDIF(WITH_SAMPLERATE)
172
173 #IF(WITH_FFTW3)
174 #       ADD_DEFINITIONS(-DWITH_FFTW3)
175 #       LIST(APPEND INC fftw ${FFTW3_INC})
176 #       SET(FFTW3SRC
177 #               fftw/AUD_BandPassFactory.cpp
178 #               fftw/AUD_BandPassReader.cpp
179 #       )
180 #ENDIF(WITH_FFTW3)
181
182 IF(WITH_PYTHON)
183         LIST(APPEND INC Python ${PYTHON_INC})
184         SET(PYTHONSRC
185                 Python/AUD_PyAPI.cpp
186         )
187         ADD_DEFINITIONS(-DWITH_PYTHON)
188 ENDIF(WITH_PYTHON)
189
190 SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${SRCFILESRC} ${FFTW3SRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC} ${PYTHONSRC})
191
192 BLENDERLIB(bf_intern_audaspace "${SRC}" "${INC}")