Skip to content

Commit

Permalink
Add CMake find module for OpenSLES API
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbroher committed Mar 7, 2017
1 parent 94b74d7 commit eb7b427
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions cmake/FindOpenSLES.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# - Find OpenSL ES includes and libraries
#
# OPENSLES_FOUND - True if OPENSLES_INCLUDE_DIR & OPENSLES_LIBRARY
# are found
# OPENSLES_LIBRARIES - Set when OPENSLES_LIBRARY is found
# OPENSLES_INCLUDE_DIRS - Set when OPENSLES_INCLUDE_DIR is found
#
# OPENSLES_INCLUDE_DIR - where to find OpenSLES.h, etc.
# OPENSLES_LIBRARY - the OpenSLES library
#

find_path(OPENSLES_INCLUDE_DIR
NAMES OpenSLES.h
PATH_SUFFIXES SLES
DOC "The OpenSL ES include directory"
)

find_library(OPENSLES_LIBRARY
NAME OpenSLES
DOC "The OpenSL ES library"
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpenSLES
REQUIRED_VARS OPENSLES_LIBRARY OPENSLES_INCLUDE_DIR
)

if(OPENSLES_FOUND)
set(OPENSLES_LIBRARIES ${OPENSLES_LIBRARY})
set(OPENSLES_INCLUDE_DIRS ${OPENSLES_INCLUDE_DIRS})
endif()

mark_as_advanced(OPENSLES_INCLUDE_DIR OPENSLES_LIBRARY)

0 comments on commit eb7b427

Please sign in to comment.