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:
Anonymous Maarten
2023-03-19 21:24:51 +01:00
parent f360965db6
commit 773aad14f8
5 changed files with 14 additions and 15 deletions

View File

@@ -250,7 +250,6 @@ macro(CheckLibSampleRate)
find_package(SampleRate QUIET)
if(SampleRate_FOUND AND TARGET SampleRate::samplerate)
set(HAVE_LIBSAMPLERATE TRUE)
set(HAVE_LIBSAMPLERATE_H TRUE)
if(SDL_LIBSAMPLERATE_SHARED)
target_include_directories(sdl-build-options INTERFACE $<TARGET_PROPERTY:SampleRate::samplerate,INTERFACE_INCLUDE_DIRECTORIES>)
if(NOT HAVE_SDL_LOADSO)