diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-10-20 16:34:57 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-10-20 16:34:57 +0300 |
commit | cda4a49a95c446be7738ab541008423690144761 (patch) | |
tree | 326a7a43235b37a847c459152a8a453c754b0f69 | |
parent | debef007b62bc5e8696e02f96111bd2a10072562 (diff) |
meson: add 'util' option to disable kms++util and utils
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | meson.build | 8 | ||||
-rw-r--r-- | meson_options.txt | 1 | ||||
-rw-r--r-- | py/pykms/meson.build | 14 |
3 files changed, 18 insertions, 5 deletions
diff --git a/meson.build b/meson.build index cd604af..9652009 100644 --- a/meson.build +++ b/meson.build @@ -41,8 +41,12 @@ pybind11_dep = declare_dependency(include_directories : pybind11_includes) libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap')) subdir('kms++') -subdir('kms++util') -subdir('utils') + +if get_option('utils') + subdir('kms++util') + subdir('utils') +endif + subdir('py') if get_option('kmscube') diff --git a/meson_options.txt b/meson_options.txt index 3f18c02..cd854ab 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,3 +2,4 @@ option('kmscube', type : 'boolean', value : false) option('pykms', type : 'feature', value : 'auto') option('omap', type : 'feature', value : 'auto') option('static-libc', type : 'boolean', value : false) +option('utils', type : 'boolean', value : true) diff --git a/py/pykms/meson.build b/py/pykms/meson.build index c0860d3..db2f8c7 100644 --- a/py/pykms/meson.build +++ b/py/pykms/meson.build @@ -7,10 +7,15 @@ endif pykms_sources = files([ 'pykmsbase.cpp', 'pykms.cpp', - 'pykmsutil.cpp', - 'pyvid.cpp', ]) +if get_option('utils') + pykms_sources += files([ + 'pykmsutil.cpp', + 'pyvid.cpp', + ]) +endif + if libdrmomap_dep.found() pykms_sources += files([ 'pykmsomap.cpp', @@ -19,11 +24,14 @@ endif pykms_deps = [ libkmsxx_dep, - libkmsxxutil_dep, py3_dep, pybind11_dep, ] +if get_option('utils') + pykms_deps += [ libkmsxxutil_dep ] +endif + destdir = get_option('libdir') / 'python' + py3_dep.version() / 'site-packages/pykms' pykms = shared_module('pykms', |