SFML/cmake/Modules/FindGLES.cmake
Chris Thrasher f0e72be285 Prefer using IMPORTED targets where possible
My goal is to reduce our need on sfml_find_package until it can
finally be removed. It's preferred to simply use find_package to
find 3rd party projects.

I had to add IMPORTED targets to some of our find modules so that
we could get away from using INTERFACE libraries for external code.
That also implied that our find moduels need to be installed so that
users have access to them when processing SFML's config module.
2023-08-23 09:14:59 -06:00

20 lines
511 B
CMake

#
# Try to find GLES library and include path.
# Once done this will define
#
# GLES_FOUND
# GLES_INCLUDE_PATH
# GLES_LIBRARY
#
find_path(GLES_INCLUDE_DIR GLES/gl.h)
find_library(GLES_LIBRARY NAMES GLESv1_CM)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLES DEFAULT_MSG GLES_LIBRARY GLES_INCLUDE_DIR)
add_library(GLES::GLES IMPORTED UNKNOWN)
set_target_properties(GLES::GLES PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${GLES_INCLUDE_DIR}
IMPORTED_LOCATION ${GLES_LIBRARY})