diff options
author | Sam Lantinga <slouken@libsdl.org> | 2017-01-06 20:43:53 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2017-01-06 20:43:53 -0800 |
commit | a8e71c7beb0fc21bffaba092c4ef5198ea97b25f (patch) | |
tree | 39b68533937079f7b950fb15366cd7503d7b16d4 /cmake | |
parent | 006ec701d94f15a3e2d36e600faa7b128fa909c4 (diff) | |
download | sdl-a8e71c7beb0fc21bffaba092c4ef5198ea97b25f.tar.gz |
Added configure and cmake support for libsamplerate
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/sdlchecks.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index b10078192..e45ab1de7 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -316,6 +316,29 @@ macro(CheckFusionSound) endmacro() # Requires: +# - LIBSAMPLERATE +# Optional: +# - LIBSAMPLERATE_SHARED opt +# - HAVE_DLOPEN opt +macro(CheckLibSampleRate) + if(LIBSAMPLERATE) + check_include_file(samplerate.h HAVE_LIBSAMPLERATE_H) + if(HAVE_LIBSAMPLERATE_H) + if(LIBSAMPLERATE_SHARED) + if(NOT HAVE_DLOPEN) + message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading") + else() + FindLibraryAndSONAME("samplerate") + set(SDL_LIBSAMPLERATE_DYNAMIC "\"${SAMPLERATE_LIB_SONAME}\"") + endif() + else() + list(APPEND EXTRA_LDFLAGS -lsamplerate) + endif() + endif() + endif() +endmacro() + +# Requires: # - n/a # Optional: # - X11_SHARED opt |