diff --git a/cmake/modules/FindSndio.cmake b/cmake/modules/FindSndio.cmake index bf5b24c39a6..3fcd7136090 100644 --- a/cmake/modules/FindSndio.cmake +++ b/cmake/modules/FindSndio.cmake @@ -19,14 +19,16 @@ if(SNDIO_LIBRARY) get_filename_component(SNDIO_LIBRARY_DIR ${SNDIO_LIBRARY} PATH) endif(SNDIO_LIBRARY) -check_library_exists(sndio sio_open "${SNDIO_LIBRARY_DIR}" HAVE_SNDIO) -if(HAVE_SNDIO) - message(STATUS "Found sndio: ${SNDIO_LIBRARY}") -else(HAVE_SNDIO) - message(STATUS "sndio not found") -endif(HAVE_SNDIO) -set(SNDIO_FOUND ${HAVE_SNDIO}) +check_library_exists(sndio sio_open "${SNDIO_LIBRARY_DIR}" HAVE_SIO_OPEN) + +find_path(SNDIO_INCLUDE_DIR sndio.h) -find_path(SNDIO_INCLUDES sndio.h) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SNDIO DEFAULT_MSG SNDIO_LIBRARY SNDIO_INCLUDE_DIR HAVE_SIO_OPEN) + +if(SNDIO_FOUND) + set(SNDIO_INCLUDE_DIRS "${SNDIO_INCLUDE_DIR}") + set(SNDIO_LIBRARIES "${SNDIO_LIBRARY}") +endif(HAVE_SNDIO) -mark_as_advanced(SNDIO_INCLUDES SNDIO_LIBRARY) +mark_as_advanced(SNDIO_INCLUDE_DIR SNDIO_LIBRARY SNDIO_INCLUDE_DIRS SNDIO_LIBRARIES) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 17695b5a051..b18fa897e46 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -138,7 +138,7 @@ SET(LMMS_REQUIRED_LIBS ${LMMS_REQUIRED_LIBS} ${SDL_LIBRARY} ${PORTAUDIO_LIBRARIES} ${SOUNDIO_LIBRARY} - ${SNDIO_LIBRARY} + ${SNDIO_LIBRARIES} ${PULSEAUDIO_LIBRARIES} ${JACK_LIBRARIES} ${OGGVORBIS_LIBRARIES}