mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 14:56:00 +00:00
cmake: Fix building without libsamplerate library
On Fedora, the headers for 32-bit and 64-bit are shared. When building a 32-bit library, CMake found the header (that was installed for the 64-bit libsamplerate development package). Because no 32-bit libsamplerate library was installed, linking failed. (SDL_LIBSAMPLERATE_DYNAMIC was set to FALSE because CMake could not find a library)
This commit is contained in:
@@ -100,7 +100,7 @@ static const AudioBootStrap *const bootstrap[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifdef HAVE_LIBSAMPLERATE_H
|
||||
#ifdef HAVE_LIBSAMPLERATE
|
||||
#ifdef SDL_LIBSAMPLERATE_DYNAMIC
|
||||
static void *SRC_lib = NULL;
|
||||
#endif
|
||||
@@ -965,7 +965,7 @@ int SDL_InitAudio(const char *driver_name)
|
||||
/* Make sure we have a list of devices available at startup. */
|
||||
current_audio.impl.DetectDevices();
|
||||
|
||||
#ifdef HAVE_LIBSAMPLERATE_H
|
||||
#ifdef HAVE_LIBSAMPLERATE
|
||||
LoadLibSampleRate();
|
||||
#endif
|
||||
|
||||
@@ -1590,7 +1590,7 @@ void SDL_QuitAudio(void)
|
||||
SDL_zero(current_audio);
|
||||
SDL_zeroa(open_devices);
|
||||
|
||||
#ifdef HAVE_LIBSAMPLERATE_H
|
||||
#ifdef HAVE_LIBSAMPLERATE
|
||||
UnloadLibSampleRate();
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user