Commit 5ec1cef6b5c2d58c3cb90959de5d4ed979611d3e

Brad Smith 2022-10-06T22:43:33

Further fixes for the sndio CMake detection

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 0043ed6..3164530 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -305,6 +305,7 @@ macro(CheckSNDIO)
       file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
       list(APPEND SOURCE_FILES ${SNDIO_SOURCES})
       set(SDL_AUDIO_DRIVER_SNDIO 1)
+      list(APPEND EXTRA_CFLAGS ${PKG_SNDIO_CFLAGS})
       if(SDL_SNDIO_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
       endif()
@@ -313,7 +314,7 @@ macro(CheckSNDIO)
         set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"")
         set(HAVE_SNDIO_SHARED TRUE)
       else()
-        list(APPEND EXTRA_LIBS ${D_SNDIO_LIB})
+        list(APPEND EXTRA_LIBS ${PKG_SNDIO_LDFLAGS})
       endif()
       set(HAVE_SDL_AUDIO TRUE)
     endif()