rename cmake include/libraries to conform with suggested cmake names
[blender.git] / intern / audaspace / CMakeLists.txt
index a9f5030..ab88c9e 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 # ***** BEGIN LGPL LICENSE BLOCK *****
 #
-# Copyright 2009 Jörg Hermann Müller
+# Copyright 2009 Jrg Hermann Mller
 #
 # This file is part of AudaSpace.
 #
 #
 # ***** END LGPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        intern
-       FX SRC
-       ${PTHREADS_INC}
-       ${LIBSAMPLERATE_INC}
+       FX
+       SRC
+       ../ffmpeg
 )
 
-SET(SRC
+set(INC_SYS
+       ${PTHREADS_INCLUDE_DIRS}
+)
+
+set(SRC
        FX/AUD_AccumulatorFactory.cpp
        FX/AUD_BaseIIRFilterReader.cpp
        FX/AUD_ButterworthFactory.cpp
@@ -153,103 +157,99 @@ SET(SRC
        FX/AUD_VolumeFactory.h
 )
 
-IF(WITH_FFMPEG)
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-       LIST(APPEND INC ffmpeg ${FFMPEG_INC})
-       SET(FFMPEGSRC
+if(WITH_CODEC_FFMPEG)
+       add_definitions(-DWITH_FFMPEG)
+       list(APPEND INC ffmpeg)
+       list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
+       list(APPEND SRC
                ffmpeg/AUD_FFMPEGFactory.cpp
                ffmpeg/AUD_FFMPEGReader.cpp
 
                ffmpeg/AUD_FFMPEGFactory.h
                ffmpeg/AUD_FFMPEGReader.h
        )
-ENDIF(WITH_FFMPEG)
+endif()
 
-IF(WITH_SDL)
-       ADD_DEFINITIONS(-DWITH_SDL)
-       LIST(APPEND INC SDL ${SDL_INCLUDE_DIR})
-       SET(SDLSRC
+if(WITH_SDL)
+       add_definitions(-DWITH_SDL)
+       list(APPEND INC SDL)
+       list(APPEND INC_SYS ${SDL_INCLUDE_DIR})
+       list(APPEND SRC
                SDL/AUD_SDLDevice.cpp
 
                SDL/AUD_SDLDevice.h
        )
-ENDIF(WITH_SDL)
+endif()
 
-IF(WITH_OPENAL)
-       ADD_DEFINITIONS(-DWITH_OPENAL)
-       LIST(APPEND INC OpenAL ${OPENAL_INCLUDE_DIR})
-       SET(OPENALSRC
+if(WITH_OPENAL)
+       add_definitions(-DWITH_OPENAL)
+       list(APPEND INC OpenAL)
+       list(APPEND INC_SYS ${OPENAL_INCLUDE_DIR})
+       list(APPEND SRC
                OpenAL/AUD_OpenALDevice.cpp
 
                OpenAL/AUD_OpenALDevice.h
-       )       
-ENDIF(WITH_OPENAL)
+       )
+endif()
 
-IF(WITH_JACK)
-       ADD_DEFINITIONS(-DWITH_JACK)
-       LIST(APPEND INC jack ${JACK_INC})
-       SET(JACKSRC
+if(WITH_JACK)
+       add_definitions(-DWITH_JACK)
+       list(APPEND INC jack)
+       list(APPEND INC_SYS ${JACK_INCLUDE_DIRS})
+       list(APPEND SRC
                jack/AUD_JackDevice.cpp
 
                jack/AUD_JackDevice.h
        )       
-ENDIF(WITH_JACK)
+endif()
 
-IF(WITH_SNDFILE)
-       ADD_DEFINITIONS(-DWITH_SNDFILE)
-       LIST(APPEND INC sndfile ${SNDFILE_INC})
-       SET(SNDFILESRC
+if(WITH_CODEC_SNDFILE)
+       add_definitions(-DWITH_SNDFILE)
+       list(APPEND INC sndfile)
+       list(APPEND INC_SYS ${SNDFILE_INCLUDE_DIRS})
+       list(APPEND SRC
                sndfile/AUD_SndFileFactory.cpp
                sndfile/AUD_SndFileReader.cpp
 
                sndfile/AUD_SndFileFactory.h
                sndfile/AUD_SndFileReader.h
        )
-ENDIF(WITH_SNDFILE)
+endif()
 
-IF(WITH_SAMPLERATE)
-       ADD_DEFINITIONS(-DWITH_SAMPLERATE)
-       SET(SRCFILESRC
+if(WITH_SAMPLERATE)
+       add_definitions(-DWITH_SAMPLERATE)
+       list(APPEND INC_SYS ${SAMPLERATE_INCLUDE_DIRS})
+       list(APPEND SRC
                SRC/AUD_SRCResampleFactory.cpp
                SRC/AUD_SRCResampleReader.cpp
 
                SRC/AUD_SRCResampleFactory.h
                SRC/AUD_SRCResampleReader.h
        )
-ENDIF(WITH_SAMPLERATE)
+endif()
 
-IF(WITH_FFTW3 AND FALSE)
-       ADD_DEFINITIONS(-DWITH_FFTW3)
-       LIST(APPEND INC fftw ${FFTW3_INC})
-       SET(FFTW3SRC
+if(WITH_FFTW3 AND FALSE)
+       add_definitions(-DWITH_FFTW3)
+       list(APPEND INC fftw)
+       list(APPEND INC_SYS ${FFTW3_INCLUDE_DIRS})
+       list(APPEND SRC
                fftw/AUD_BandPassFactory.cpp
                fftw/AUD_BandPassReader.cpp
 
                fftw/AUD_BandPassFactory.h
                fftw/AUD_BandPassReader.h
        )
-ENDIF(WITH_FFTW3 AND FALSE)
+endif()
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC Python ${PYTHON_INC})
-       SET(PYTHONSRC
+if(WITH_PYTHON)
+       list(APPEND INC Python)
+       list(APPEND INC_SYS ${PYTHON_INCLUDE_DIRS})
+       list(APPEND SRC
                Python/AUD_PyAPI.cpp
 
                Python/AUD_PyAPI.h
        )
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
-
-SET(SRC
-       ${SRC}
-       ${FFMPEGSRC}
-       ${SNDFILESRC}
-       ${SRCFILESRC}
-       ${FFTW3SRC}
-       ${SDLSRC}
-       ${OPENALSRC}
-       ${JACKSRC}
-       ${PYTHONSRC}
-)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-BLENDERLIB(bf_intern_audaspace "${SRC}" "${INC}")
+blender_add_lib(bf_intern_audaspace "${SRC}" "${INC}" "${INC_SYS}")