diff options
author | David Robillard <d@drobilla.net> | 2020-06-21 18:50:55 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-08 23:36:35 -0500 |
commit | 18fcbc74f3b4d5452420bd108894624876ade27f (patch) | |
tree | 98b984eb4c3560fe2d32e357956460dd1c7c5668 /meson.build | |
parent | dc5ccf0913fe716059bb633d8a183cbddc634a7a (diff) | |
download | serd-18fcbc74f3b4d5452420bd108894624876ade27f.tar.gz serd-18fcbc74f3b4d5452420bd108894624876ade27f.tar.bz2 serd-18fcbc74f3b4d5452420bd108894624876ade27f.zip |
WIP: Add Python bindings
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 81415fe5..cefc0ef2 100644 --- a/meson.build +++ b/meson.build @@ -203,6 +203,27 @@ if is_variable('cpp') subdir('bindings/cpp') endif +# Find system programs we might need for the build +cython = find_program('cython3', required: get_option('bindings_py')) +doxygen = find_program('doxygen', required: get_option('docs')) +sphinx_build = find_program( + 'sphinx-build', + required: (get_option('docs').enabled() or + (get_option('bindings_py').enabled() and + get_option('tests')))) + +docdir = get_option('datadir') / 'doc' + +# Python bindings +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 meson.version().version_compare('>=0.53.0') summary('Tests', get_option('tests'), bool_yn: true) summary('Utilities', get_option('utils'), bool_yn: true) |