36 lines
750 B
CMake
36 lines
750 B
CMake
find_path(
|
|
WaylandEGL_INCLUDE_DIR
|
|
NAMES wayland-egl.h
|
|
)
|
|
|
|
find_library(
|
|
WaylandEGL_LIBRARY
|
|
NAMES wayland-egl libwayland-egl
|
|
)
|
|
|
|
if(WaylandEGL_INCLUDE_DIR AND WaylandEGL_LIBRARY)
|
|
add_library(wayland::egl UNKNOWN IMPORTED)
|
|
|
|
set_target_properties(
|
|
wayland::egl PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES "${WaylandEGL_INCLUDE_DIR}"
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
|
IMPORTED_LOCATION "${WaylandEGL_LIBRARY}"
|
|
)
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(
|
|
WaylandEGL
|
|
REQUIRED_VARS WaylandEGL_LIBRARY WaylandEGL_INCLUDE_DIR
|
|
)
|
|
|
|
mark_as_advanced(
|
|
WaylandEGL_INCLUDE_DIR
|
|
WaylandEGL_LIBRARY
|
|
)
|
|
|
|
if(WaylandEGL_FOUND)
|
|
message(STATUS "Found WaylandEGL: ${WaylandEGL_LIBRARY}")
|
|
endif()
|