diff options
-rw-r--r-- | meson.build | 3 | ||||
-rw-r--r-- | meson_options.txt | 3 | ||||
-rw-r--r-- | py/pykms/meson.build | 9 |
3 files changed, 12 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 8db870c..f76f8b7 100644 --- a/meson.build +++ b/meson.build @@ -33,9 +33,6 @@ add_global_link_arguments(link_arguments, language : 'cpp') libfmt_dep = dependency('fmt') -pybind11_includes = include_directories('ext/pybind11/include') -pybind11_dep = declare_dependency(include_directories : pybind11_includes) - libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap')) subdir('kms++') diff --git a/meson_options.txt b/meson_options.txt index 754db32..da6dc93 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,5 +10,8 @@ option('utils', type : 'boolean', value : true, option('pykms', type : 'feature', value : 'auto', description : 'Build python bindings') +option('system-pybind11', type : 'feature', value : 'auto', + description : 'Use pybind11 from the system or from meson subproject') + option('kmscube', type : 'boolean', value : false, description : 'Build kmscube test application') 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', |