diff options
Diffstat (limited to 'cmake/sdlchecks.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 |