1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 20:31:17 +00:00
conky/cmake/FindWayland.cmake
2022-12-24 11:29:19 -05:00

55 lines
1.3 KiB
CMake

find_path(
Wayland_CLIENT_INCLUDE_DIR
NAMES wayland-client.h
)
find_library(
Wayland_CLIENT_LIBRARY
NAMES wayland-client libwayland-client
)
if(Wayland_CLIENT_INCLUDE_DIR AND Wayland_CLIENT_LIBRARY)
add_library(wayland::client UNKNOWN IMPORTED)
set_target_properties(
wayland::client PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_CLIENT_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${Wayland_CLIENT_LIBRARY}"
)
endif()
find_path(
Wayland_SERVER_INCLUDE_DIR
NAMES wayland-server.h
)
find_library(
Wayland_SERVER_LIBRARY
NAMES wayland-server libwayland-server
)
if(Wayland_SERVER_INCLUDE_DIR AND Wayland_SERVER_LIBRARY)
add_library(wayland::server UNKNOWN IMPORTED)
set_target_properties(
wayland::server PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_SERVER_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${Wayland_SERVER_LIBRARY}"
)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Wayland
REQUIRED_VARS Wayland_CLIENT_LIBRARY Wayland_CLIENT_INCLUDE_DIR Wayland_SERVER_LIBRARY Wayland_SERVER_INCLUDE_DIR
)
mark_as_advanced(
Wayland_CLIENT_INCLUDE_DIR
Wayland_CLIENT_LIBRARY
Wayland_SERVER_INCLUDE_DIR
Wayland_SERVER_LIBRARY
)