WITH_SAMPLERATE option for cmake, without this playback wont behave right so this...
[blender-staging.git] / build_files / cmake / macros.cmake
index 0da1d6c37dcf77be774a01ed4c5236f3fb2fdedb..9ee83615ba6d4aa48c862b9838e588005ff0ad27 100644 (file)
@@ -55,8 +55,8 @@ MACRO(SETUP_LIBDIRS)
                CMAKE_POLICY(SET CMP0003 NEW)
        endif(COMMAND cmake_policy)
        
-       LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH} ${LIBSAMPLERATE_LIBPATH})
-       
+       LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
+
        IF(WITH_PYTHON)
                LINK_DIRECTORIES(${PYTHON_LIBPATH})
        ENDIF(WITH_PYTHON)
@@ -91,6 +91,9 @@ MACRO(SETUP_LIBDIRS)
        IF(WITH_SNDFILE)
                LINK_DIRECTORIES(${SNDFILE_LIBPATH})
        ENDIF(WITH_SNDFILE)
+       IF(WITH_SAMPLERATE)
+               LINK_DIRECTORIES(${LIBSAMPLERATE_LIBPATH})
+       ENDIF(WITH_SAMPLERATE)
        IF(WITH_FFTW3)
                LINK_DIRECTORIES(${FFTW3_LIBPATH})
        ENDIF(WITH_FFTW3)
@@ -124,7 +127,7 @@ MACRO(SETUP_LIBLINKS
        ENDIF(WITH_PYTHON)
 
        TARGET_LINK_LIBRARIES(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB})
-       TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY} ${LIBSAMPLERATE_LIB})
+       TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY})
 
        IF(WITH_INTERNATIONAL)
                TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
@@ -146,6 +149,9 @@ MACRO(SETUP_LIBLINKS
        IF(WITH_SNDFILE)
                TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB})
        ENDIF(WITH_SNDFILE)
+       IF(WITH_SAMPLERATE)
+               TARGET_LINK_LIBRARIES(${target} ${LIBSAMPLERATE_LIB})
+       ENDIF(WITH_SAMPLERATE)  
        IF(WITH_SDL)
                TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
        ENDIF(WITH_SDL)