2022-11-28 19:23:23 +00:00
|
|
|
find_path(
|
2022-12-24 15:57:50 +00:00
|
|
|
Wayland_CLIENT_INCLUDE_DIR
|
2022-11-28 19:23:23 +00:00
|
|
|
NAMES wayland-client.h
|
|
|
|
)
|
|
|
|
|
|
|
|
find_library(
|
2022-12-24 15:57:50 +00:00
|
|
|
Wayland_CLIENT_LIBRARY
|
2022-11-28 19:23:23 +00:00
|
|
|
NAMES wayland-client libwayland-client
|
|
|
|
)
|
|
|
|
|
2022-12-24 15:57:50 +00:00
|
|
|
if(Wayland_CLIENT_INCLUDE_DIR AND Wayland_CLIENT_LIBRARY)
|
2022-11-28 19:23:23 +00:00
|
|
|
add_library(wayland::client UNKNOWN IMPORTED)
|
|
|
|
|
|
|
|
set_target_properties(
|
|
|
|
wayland::client PROPERTIES
|
2022-12-24 15:57:50 +00:00
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_CLIENT_INCLUDE_DIR}"
|
2022-11-28 19:23:23 +00:00
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
2022-12-24 15:57:50 +00:00
|
|
|
IMPORTED_LOCATION "${Wayland_CLIENT_LIBRARY}"
|
2022-11-28 19:23:23 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_path(
|
2022-12-24 15:57:50 +00:00
|
|
|
Wayland_SERVER_INCLUDE_DIR
|
2022-11-28 19:23:23 +00:00
|
|
|
NAMES wayland-server.h
|
|
|
|
)
|
|
|
|
|
|
|
|
find_library(
|
2022-12-24 15:57:50 +00:00
|
|
|
Wayland_SERVER_LIBRARY
|
2022-11-28 19:23:23 +00:00
|
|
|
NAMES wayland-server libwayland-server
|
|
|
|
)
|
|
|
|
|
2022-12-24 15:57:50 +00:00
|
|
|
if(Wayland_SERVER_INCLUDE_DIR AND Wayland_SERVER_LIBRARY)
|
2022-11-28 19:23:23 +00:00
|
|
|
add_library(wayland::server UNKNOWN IMPORTED)
|
|
|
|
|
|
|
|
set_target_properties(
|
|
|
|
wayland::server PROPERTIES
|
2022-12-24 15:57:50 +00:00
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_SERVER_INCLUDE_DIR}"
|
2022-11-28 19:23:23 +00:00
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
2022-12-24 15:57:50 +00:00
|
|
|
IMPORTED_LOCATION "${Wayland_SERVER_LIBRARY}"
|
2022-11-28 19:23:23 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(
|
2022-12-24 15:57:50 +00:00
|
|
|
Wayland
|
|
|
|
REQUIRED_VARS Wayland_CLIENT_LIBRARY Wayland_CLIENT_INCLUDE_DIR Wayland_SERVER_LIBRARY Wayland_SERVER_INCLUDE_DIR
|
2022-11-28 19:23:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
mark_as_advanced(
|
2022-12-24 15:57:50 +00:00
|
|
|
Wayland_CLIENT_INCLUDE_DIR
|
|
|
|
Wayland_CLIENT_LIBRARY
|
|
|
|
Wayland_SERVER_INCLUDE_DIR
|
|
|
|
Wayland_SERVER_LIBRARY
|
2022-12-24 14:30:48 +00:00
|
|
|
)
|