0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. From 46aaf2b2b4d3ec240b9aad175bb3eddb6ae11ead Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Fri, 4 Mar 2022 17:59:19 +0100
  4. Subject: [PATCH] src/CMakeLists.txt: allow override of wayland pkgdatadir
  5. Allow the user to override WAYLAND_{PROTOCOLS_BASE,CLIENT_PKGDATADIR}
  6. (needed when cross-compiling)
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. [Upstream status: https://github.com/glfw/glfw/pull/2053]
  9. ---
  10. src/CMakeLists.txt | 8 ++++++--
  11. 1 file changed, 6 insertions(+), 2 deletions(-)
  12. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
  13. index 01f191c9..475ce882 100644
  14. --- a/src/CMakeLists.txt
  15. +++ b/src/CMakeLists.txt
  16. @@ -75,7 +75,9 @@ if (GLFW_BUILD_WAYLAND)
  17. include(FindPkgConfig)
  18. find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
  19. pkg_check_modules(WAYLAND_PROTOCOLS REQUIRED wayland-protocols>=1.15)
  20. - pkg_get_variable(WAYLAND_PROTOCOLS_BASE wayland-protocols pkgdatadir)
  21. + if (NOT WAYLAND_PROTOCOLS_BASE)
  22. + pkg_get_variable(WAYLAND_PROTOCOLS_BASE wayland-protocols pkgdatadir)
  23. + endif()
  24. macro(wayland_generate protocol_file output_file)
  25. add_custom_command(OUTPUT "${output_file}.h"
  26. --
  27. 2.34.1