etlegacy-libs/openal/cmake/FindOSS.cmake

34 lines
850 B
CMake
Raw Normal View History

2015-12-12 21:07:33 +00:00
# - Find OSS includes
#
# OSS_FOUND - True if OSS_INCLUDE_DIR is found
# OSS_INCLUDE_DIRS - Set when OSS_INCLUDE_DIR is found
2018-02-02 20:24:34 +00:00
# OSS_LIBRARIES - Set when OSS_LIBRARY is found
2015-12-12 21:07:33 +00:00
#
# OSS_INCLUDE_DIR - where to find sys/soundcard.h, etc.
2018-02-02 20:24:34 +00:00
# OSS_LIBRARY - where to find libossaudio (optional).
2015-12-12 21:07:33 +00:00
#
find_path(OSS_INCLUDE_DIR
NAMES sys/soundcard.h
DOC "The OSS include directory"
)
2018-02-02 20:24:34 +00:00
find_library(OSS_LIBRARY
NAMES ossaudio
DOC "Optional OSS library"
)
2015-12-12 21:07:33 +00:00
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OSS REQUIRED_VARS OSS_INCLUDE_DIR)
if(OSS_FOUND)
set(OSS_INCLUDE_DIRS ${OSS_INCLUDE_DIR})
2018-02-02 20:24:34 +00:00
if(OSS_LIBRARY)
set(OSS_LIBRARIES ${OSS_LIBRARY})
else()
unset(OSS_LIBRARIES)
endif()
2015-12-12 21:07:33 +00:00
endif()
2018-02-02 20:24:34 +00:00
mark_as_advanced(OSS_INCLUDE_DIR OSS_LIBRARY)