cmake/sdlchecks.cmake
changeset 10777 2883d23b5a28
parent 10511 8e646a2d1929
child 11081 eea7f98a37e4
equal deleted inserted replaced
10776:7e935b2c430f 10777:2883d23b5a28
   309         endif()
   309         endif()
   310       else()
   310       else()
   311         list(APPEND EXTRA_LDFLAGS ${PKG_FUSIONSOUND_LDFLAGS})
   311         list(APPEND EXTRA_LDFLAGS ${PKG_FUSIONSOUND_LDFLAGS})
   312       endif()
   312       endif()
   313       set(HAVE_SDL_AUDIO TRUE)
   313       set(HAVE_SDL_AUDIO TRUE)
       
   314     endif()
       
   315   endif()
       
   316 endmacro()
       
   317 
       
   318 # Requires:
       
   319 # - LIBSAMPLERATE
       
   320 # Optional:
       
   321 # - LIBSAMPLERATE_SHARED opt
       
   322 # - HAVE_DLOPEN opt
       
   323 macro(CheckLibSampleRate)
       
   324   if(LIBSAMPLERATE)
       
   325     check_include_file(samplerate.h HAVE_LIBSAMPLERATE_H)
       
   326     if(HAVE_LIBSAMPLERATE_H)
       
   327       if(LIBSAMPLERATE_SHARED)
       
   328         if(NOT HAVE_DLOPEN)
       
   329           message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
       
   330         else()
       
   331           FindLibraryAndSONAME("samplerate")
       
   332           set(SDL_LIBSAMPLERATE_DYNAMIC "\"${SAMPLERATE_LIB_SONAME}\"")
       
   333         endif()
       
   334       else()
       
   335         list(APPEND EXTRA_LDFLAGS -lsamplerate)
       
   336       endif()
   314     endif()
   337     endif()
   315   endif()
   338   endif()
   316 endmacro()
   339 endmacro()
   317 
   340 
   318 # Requires:
   341 # Requires: