]> git.tdb.fi Git - ext/openal.git/blob - cmake/FindOSS.cmake
Import OpenAL Soft 1.23.1 sources
[ext/openal.git] / cmake / FindOSS.cmake
1 # - Find OSS includes
2 #
3 #   OSS_FOUND        - True if OSS_INCLUDE_DIR is found
4 #   OSS_INCLUDE_DIRS - Set when OSS_INCLUDE_DIR is found
5 #   OSS_LIBRARIES    - Set when OSS_LIBRARY is found
6 #
7 #   OSS_INCLUDE_DIR - where to find sys/soundcard.h, etc.
8 #   OSS_LIBRARY     - where to find libossaudio (optional).
9 #
10
11 find_path(OSS_INCLUDE_DIR
12           NAMES sys/soundcard.h
13           DOC "The OSS include directory"
14 )
15
16 find_library(OSS_LIBRARY
17              NAMES ossaudio
18              DOC "Optional OSS library"
19 )
20
21 include(FindPackageHandleStandardArgs)
22 find_package_handle_standard_args(OSS  REQUIRED_VARS OSS_INCLUDE_DIR)
23
24 if(OSS_FOUND)
25     set(OSS_INCLUDE_DIRS ${OSS_INCLUDE_DIR})
26     if(OSS_LIBRARY)
27         set(OSS_LIBRARIES ${OSS_LIBRARY})
28     else()
29         unset(OSS_LIBRARIES)
30     endif()
31 endif()
32
33 mark_as_advanced(OSS_INCLUDE_DIR OSS_LIBRARY)