From e7224eb5355654db439b14362d19063acd7aec27 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 16 Dec 2020 09:18:24 +0200 Subject: meson: add option to use system pybind11 or subproject Add 'system-pybind11' option. enabled = use pybind11 from the system disabled = use pybind11 from meson subproject auto = use pybind11 from the system, or, if not available, subproject Signed-off-by: Tomi Valkeinen --- py/pykms/meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'py/pykms/meson.build') diff --git a/py/pykms/meson.build b/py/pykms/meson.build index 518040b..b29cd9f 100644 --- a/py/pykms/meson.build +++ b/py/pykms/meson.build @@ -4,6 +4,15 @@ if py3_dep.found() == false subdir_done() endif +if get_option('system-pybind11').enabled() + pybind11_dep = dependency('pybind11') +elif get_option('system-pybind11').disabled() + pybind11_proj = subproject('pybind11') + pybind11_dep = pybind11_proj.get_variable('pybind11_dep') +else + pybind11_dep = dependency('pybind11', fallback : ['pybind11', 'pybind11_dep']) +endif + pykms_sources = files([ 'pykmsbase.cpp', 'pykms.cpp', -- cgit v1.2.3