summaryrefslogtreecommitdiff
path: root/py/pykms
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2020-09-05 10:54:18 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2020-09-14 11:40:34 +0300
commitccd3eb09b482d8a872b270436535c6c20ee4363f (patch)
tree0923d585f537cfac899133e7e27fc3cfbabbc8d2 /py/pykms
parent5a920540b12253b1ebd7e658df19f916e3c55135 (diff)
Add meson build
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'py/pykms')
-rw-r--r--py/pykms/meson.build38
1 files changed, 38 insertions, 0 deletions
diff --git a/py/pykms/meson.build b/py/pykms/meson.build
new file mode 100644
index 0000000..c0860d3
--- /dev/null
+++ b/py/pykms/meson.build
@@ -0,0 +1,38 @@
+py3_dep = dependency('python3', required : get_option('pykms'))
+
+if py3_dep.found() == false
+ subdir_done()
+endif
+
+pykms_sources = files([
+ 'pykmsbase.cpp',
+ 'pykms.cpp',
+ 'pykmsutil.cpp',
+ 'pyvid.cpp',
+])
+
+if libdrmomap_dep.found()
+ pykms_sources += files([
+ 'pykmsomap.cpp',
+ ])
+endif
+
+pykms_deps = [
+ libkmsxx_dep,
+ libkmsxxutil_dep,
+ py3_dep,
+ pybind11_dep,
+]
+
+destdir = get_option('libdir') / 'python' + py3_dep.version() / 'site-packages/pykms'
+
+pykms = shared_module('pykms',
+ pykms_sources,
+ install : true,
+ install_dir : destdir,
+ name_prefix : '',
+ dependencies : pykms_deps)
+
+# Copy __init__.py to build dir so that we can run without installing
+configure_file(input: '__init__.py', output: '__init__.py', copy: true,
+ install : true, install_dir : destdir)