0002-meson-add-use-system-pybind11-option.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 27f15549ce67194e4152c57db2b762b7a443b4c7 Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Sun, 29 Nov 2020 11:14:41 +0100
  4. Subject: [PATCH] meson: add use-system-pybind11 option
  5. [Upstream: https://github.com/tomba/kmsxx/pull/60]
  6. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  7. ---
  8. meson.build | 8 ++++++--
  9. meson_options.txt | 1 +
  10. 2 files changed, 7 insertions(+), 2 deletions(-)
  11. diff --git a/meson.build b/meson.build
  12. index 29080f4..4b3e7c3 100644
  13. --- a/meson.build
  14. +++ b/meson.build
  15. @@ -39,8 +39,12 @@ else
  16. compile_args : '-DFMT_HEADER_ONLY')
  17. endif
  18. -pybind11_includes = include_directories('ext/pybind11/include')
  19. -pybind11_dep = declare_dependency(include_directories : pybind11_includes)
  20. +if get_option('use-system-pybind11')
  21. + pybind11_dep = dependency('pybind11')
  22. +else
  23. + pybind11_includes = include_directories('ext/pybind11/include')
  24. + pybind11_dep = declare_dependency(include_directories : pybind11_includes)
  25. +endif
  26. libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap'))
  27. diff --git a/meson_options.txt b/meson_options.txt
  28. index 48176a8..095c6f2 100644
  29. --- a/meson_options.txt
  30. +++ b/meson_options.txt
  31. @@ -5,3 +5,4 @@ option('static-libc', type : 'boolean', value : false)
  32. option('utils', type : 'boolean', value : true)
  33. option('use-system-fmt', type : 'boolean', value : false)
  34. +option('use-system-pybind11', type : 'boolean', value : false)
  35. --
  36. 2.29.2