FindWayland.cmake 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. # Copyright (c) 2008-2023 the Urho3D project
  2. # License: MIT
  3. # Find Wayland display server
  4. #
  5. # WAYLAND_FOUND
  6. # WAYLAND_INCLUDE_DIRS
  7. # WAYLAND_CORE_PROTOCOL_DIR
  8. # WAYLAND_PROTOCOLS_DIR
  9. # WAYLAND_CLIENT
  10. # WAYLAND_SCANNER
  11. # WAYLAND_CURSOR
  12. # WAYLAND_EGL
  13. # EGL
  14. # XKB
  15. #
  16. find_path (WAYLAND_INCLUDE_DIRS NAMES wayland-client.h DOC "Wayland include directory")
  17. find_path (WAYLAND_CORE_PROTOCOL_DIR NAMES wayland.xml PATHS /usr/share/wayland DOC "Wayland core protocol directory")
  18. find_path (WAYLAND_PROTOCOLS_DIR NAMES stable unstable PATHS /usr/share/wayland-protocols DOC "Wayland protocol directory")
  19. find_library (WAYLAND_CLIENT NAMES wayland-client DOC "Wayland client library")
  20. find_program (WAYLAND_SCANNER NAMES wayland-scanner DOC "Wayland scanner host tool")
  21. find_library (WAYLAND_CURSOR NAMES wayland-cursor DOC "Wayland compositor infrastructure - cursor library")
  22. find_library (WAYLAND_EGL NAMES wayland-egl DOC "Wayland EGL library")
  23. find_library (EGL NAMES EGL DOC "EGL library")
  24. find_library (XKB NAMES xkbcommon DOC "Xkb common library")
  25. include (FindPackageHandleStandardArgs)
  26. find_package_handle_standard_args (Wayland REQUIRED_VARS WAYLAND_CLIENT WAYLAND_SCANNER WAYLAND_CURSOR WAYLAND_EGL EGL XKB WAYLAND_INCLUDE_DIRS WAYLAND_CORE_PROTOCOL_DIR WAYLAND_PROTOCOLS_DIR FAIL_MESSAGE "Could NOT find Wayland display server")
  27. mark_as_advanced (WAYLAND_INCLUDE_DIRS WAYLAND_CORE_PROTOCOL_DIR WAYLAND_PROTOCOLS_DIR WAYLAND_CLIENT WAYLAND_SCANNER WAYLAND_CURSOR WAYLAND_EGL EGL XKB)