0003-meson-only-build-py-in-case-pykms-is-enabled.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 0ef36b2e22c2ac0331b3096b7adc69fb08044048 Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Sun, 29 Nov 2020 11:37:26 +0100
  4. Subject: [PATCH] meson: only build py in case pykms is enabled
  5. [Upstream: https://github.com/tomba/kmsxx/pull/60]
  6. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  7. ---
  8. meson.build | 16 ++++++++++------
  9. 1 file changed, 10 insertions(+), 6 deletions(-)
  10. diff --git a/meson.build b/meson.build
  11. index 4b3e7c3..1810b17 100644
  12. --- a/meson.build
  13. +++ b/meson.build
  14. @@ -39,11 +39,13 @@ else
  15. compile_args : '-DFMT_HEADER_ONLY')
  16. endif
  17. -if get_option('use-system-pybind11')
  18. - pybind11_dep = dependency('pybind11')
  19. -else
  20. - pybind11_includes = include_directories('ext/pybind11/include')
  21. - pybind11_dep = declare_dependency(include_directories : pybind11_includes)
  22. +if get_option('pykms').enabled()
  23. + if get_option('use-system-pybind11')
  24. + pybind11_dep = dependency('pybind11')
  25. + else
  26. + pybind11_includes = include_directories('ext/pybind11/include')
  27. + pybind11_dep = declare_dependency(include_directories : pybind11_includes)
  28. + endif
  29. endif
  30. libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap'))
  31. @@ -55,7 +57,9 @@ if get_option('utils')
  32. subdir('utils')
  33. endif
  34. -subdir('py')
  35. +if get_option('pykms').enabled()
  36. + subdir('py')
  37. +endif
  38. if get_option('kmscube')
  39. subdir('kmscube')
  40. --
  41. 2.29.2