mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
f0e72be285
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.
20 lines
511 B
CMake
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})
|