diff options
-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', |