FindOpenSLES.cmake 905 B

12345678910111213141516171819202122232425262728293031
  1. # - Try to find OpenSLES
  2. # Once done this will define
  3. # OPENSLES_FOUND - System has OpenSLES
  4. # OPENSLES_INCLUDE_DIR - The OpenSLES include directory
  5. # OPENSLES_LIBRARY - The library needed to use OpenSLES
  6. # An imported target OpenSLES::OpenSLES is also created, prefer this
  7. find_path(OPENSLES_INCLUDE_DIR
  8. NAMES SLES/OpenSLES.h
  9. )
  10. find_library(OPENSLES_LIBRARY
  11. NAMES OpenSLES
  12. )
  13. include(FindPackageHandleStandardArgs)
  14. find_package_handle_standard_args(OpenSLES DEFAULT_MSG
  15. OPENSLES_LIBRARY OPENSLES_INCLUDE_DIR)
  16. if(OpenSLES_FOUND)
  17. if(NOT TARGET OpenSLES::OpenSLES)
  18. add_library(OpenSLES::OpenSLES UNKNOWN IMPORTED)
  19. set_target_properties(OpenSLES::OpenSLES PROPERTIES
  20. IMPORTED_LOCATION ${OPENSLES_LIBRARY}
  21. INTERFACE_INCLUDE_DIRECTORIES ${OPENSLES_INCLUDE_DIR}
  22. )
  23. endif()
  24. endif()
  25. mark_as_advanced(OPENSLES_INCLUDE_DIR OPENSLES_LIBRARY )