Provide messages for the remaining AL errors
[openal-soft.git] / cmake / FindSoundIO.cmake
blob10450254d213fd602682f8b579e57752644da701
1 # - Find SoundIO (sndio) includes and libraries
3 #   SOUNDIO_FOUND        - True if SOUNDIO_INCLUDE_DIR & SOUNDIO_LIBRARY are
4 #                          found
5 #   SOUNDIO_LIBRARIES    - Set when SOUNDIO_LIBRARY is found
6 #   SOUNDIO_INCLUDE_DIRS - Set when SOUNDIO_INCLUDE_DIR is found
8 #   SOUNDIO_INCLUDE_DIR - where to find sndio.h, etc.
9 #   SOUNDIO_LIBRARY     - the sndio library
12 find_path(SOUNDIO_INCLUDE_DIR
13           NAMES sndio.h
14           DOC "The SoundIO include directory"
17 find_library(SOUNDIO_LIBRARY
18              NAMES sndio
19              DOC "The SoundIO library"
22 include(FindPackageHandleStandardArgs)
23 find_package_handle_standard_args(SoundIO
24     REQUIRED_VARS SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR
27 if(SOUNDIO_FOUND)
28     set(SOUNDIO_LIBRARIES ${SOUNDIO_LIBRARY})
29     set(SOUNDIO_INCLUDE_DIRS ${SOUNDIO_INCLUDE_DIR})
30 endif()
32 mark_as_advanced(SOUNDIO_INCLUDE_DIR SOUNDIO_LIBRARY)