Blame cmake/FindOpenSLES.cmake
|
Packit |
1fb8d4 |
# - Find OpenSLES
|
|
Packit |
1fb8d4 |
# Find the OpenSLES includes and libraries
|
|
Packit |
1fb8d4 |
#
|
|
Packit |
1fb8d4 |
# OPENSLES_INCLUDE_DIR - where to find dsound.h
|
|
Packit |
1fb8d4 |
# OPENSLES_LIBRARIES - List of libraries when using dsound.
|
|
Packit |
1fb8d4 |
# OPENSLES_FOUND - True if dsound found.
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
if(OPENSLES_INCLUDE_DIR)
|
|
Packit |
1fb8d4 |
# Already in cache, be silent
|
|
Packit |
1fb8d4 |
set(OPENSLES_FIND_QUIETLY TRUE)
|
|
Packit |
1fb8d4 |
else()
|
|
Packit |
1fb8d4 |
find_package(PkgConfig)
|
|
Packit |
1fb8d4 |
pkg_check_modules(PC_OPENSLES QUIET OpenSLES)
|
|
Packit |
1fb8d4 |
endif(OPENSLES_INCLUDE_DIR)
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
find_path(OPENSLES_INCLUDE_DIR SLES/OpenSLES.h
|
|
Packit |
1fb8d4 |
HINTS ${PC_OPENSLES_INCLUDE_DIR})
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
find_library(OPENSLES_LIBRARY NAMES OpenSLES
|
|
Packit |
1fb8d4 |
HINTS ${PC_OPENSLES_LIBDIR} ${PC_OPENSLES_LIBRARY_DIRS})
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
# Handle the QUIETLY and REQUIRED arguments and set OPENSL_FOUND to TRUE if
|
|
Packit |
1fb8d4 |
# all listed variables are TRUE.
|
|
Packit |
1fb8d4 |
include(FindPackageHandleStandardArgs)
|
|
Packit |
1fb8d4 |
find_package_handle_standard_args(OPENSLES DEFAULT_MSG
|
|
Packit |
1fb8d4 |
OPENSLES_INCLUDE_DIR OPENSLES_LIBRARY)
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
if(OPENSLES_FOUND)
|
|
Packit |
1fb8d4 |
set(OPENSLES_LIBRARIES ${OPENSLES_LIBRARY})
|
|
Packit |
1fb8d4 |
else(OPENSLES_FOUND)
|
|
Packit |
1fb8d4 |
if (OpenSLES_FIND_REQUIRED)
|
|
Packit |
1fb8d4 |
message(FATAL_ERROR "Could NOT find OPENSLES")
|
|
Packit |
1fb8d4 |
endif()
|
|
Packit |
1fb8d4 |
endif(OPENSLES_FOUND)
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
mark_as_advanced(OPENSLES_INCLUDE_DIR OPENSLES_LIBRARY)
|