diff options
author | David Robillard <d@drobilla.net> | 2020-06-21 18:50:55 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 22:21:07 -0500 |
commit | ccbbd538d001ae4e17c86839b0583716e0dd3527 (patch) | |
tree | 5d55f82f617171bb34199484c21f7ec6c50f28d9 /meson.build | |
parent | cb9bc60bfd95173ead26540714dc682842cad80b (diff) | |
download | serd-ccbbd538d001ae4e17c86839b0583716e0dd3527.tar.gz serd-ccbbd538d001ae4e17c86839b0583716e0dd3527.tar.bz2 serd-ccbbd538d001ae4e17c86839b0583716e0dd3527.zip |
[WIP] Add Python bindings
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meson.build b/meson.build index db138663..5aca9e1d 100644 --- a/meson.build +++ b/meson.build @@ -146,7 +146,14 @@ if host_machine.system() != 'windows' endif # Programs used by the build +cython = find_program('cython3', required: get_option('bindings_py')) +doxygen = find_program('doxygen', required: get_option('docs')) mandoc = find_program('mandoc', required: false) +sphinx_build = find_program( + 'sphinx-build', + required: (get_option('docs').enabled() or + (get_option('bindings_py').enabled() and + get_option('tests')))) # Determine library type and the flags needed to build it library_name = versioned_name @@ -261,6 +268,7 @@ if is_variable('cpp') subdir('bindings/cpp') endif +docdir = get_option('datadir') / 'doc' if not get_option('docs').disabled() subdir('doc') endif @@ -271,9 +279,21 @@ endif subdir('schemas') +# Python bindings +py_dep = disabler() +if not get_option('bindings_py').disabled() + pymod = import('python') + py = pymod.find_installation('python3') + py_dep = py.dependency(required: get_option('bindings_py')) + if py_dep.found() and cython.found() + subdir('bindings/python') + endif +endif + if not meson.is_subproject() and meson.version().version_compare('>=0.53.0') summary('Tests', get_option('tests'), bool_yn: true) summary('Tools', get_option('tools'), bool_yn: true) + summary('Python bindings', py_dep.found() and cython.found(), bool_yn: true) summary('Install prefix', get_option('prefix')) |