]> git.tdb.fi Git - ext/openal.git/blob - cmake/FindSoundIO.cmake
Import OpenAL Soft 1.23.1 sources
[ext/openal.git] / cmake / FindSoundIO.cmake
1 # - Find SoundIO (sndio) includes and libraries
2 #
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
7 #
8 #   SOUNDIO_INCLUDE_DIR - where to find sndio.h, etc.
9 #   SOUNDIO_LIBRARY     - the sndio library
10 #
11
12 find_path(SOUNDIO_INCLUDE_DIR
13           NAMES sndio.h
14           DOC "The SoundIO include directory"
15 )
16
17 find_library(SOUNDIO_LIBRARY
18              NAMES sndio
19              DOC "The SoundIO library"
20 )
21
22 include(FindPackageHandleStandardArgs)
23 find_package_handle_standard_args(SoundIO
24     REQUIRED_VARS SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR
25 )
26
27 if(SOUNDIO_FOUND)
28     set(SOUNDIO_LIBRARIES ${SOUNDIO_LIBRARY})
29     set(SOUNDIO_INCLUDE_DIRS ${SOUNDIO_INCLUDE_DIR})
30 endif()
31
32 mark_as_advanced(SOUNDIO_INCLUDE_DIR SOUNDIO_LIBRARY)