diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-12-16 09:18:24 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-12-16 10:22:03 +0200 |
commit | e7224eb5355654db439b14362d19063acd7aec27 (patch) | |
tree | f9f49fc7eda7d05231d53c52f54f727c3b4c6826 /py/pykms | |
parent | f2ed55fda6f520f60f92f2cf9becdc52616f4460 (diff) |
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 <tomi.valkeinen@ti.com>
Diffstat (limited to 'py/pykms')
-rw-r--r-- | py/pykms/meson.build | 9 |
1 files changed, 9 insertions, 0 deletions
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', |