Skip to content

Commit

Permalink
py: fix dependency to kms++util
Browse files Browse the repository at this point in the history
Py bindings always calls init_pykmsutils() even if kms++util is not
enabled. Fix this.

Fixes #68

Signed-off-by: Tomi Valkeinen <[email protected]>
  • Loading branch information
tomba committed Dec 20, 2022
1 parent d4ed4d8 commit 32b6f82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ if libdrmomap_dep.found()
add_global_arguments('-DHAS_LIBDRM_OMAP', language : 'cpp')
endif

if get_option('libutils')
add_global_arguments('-DHAS_KMSXXUTIL', language : 'cpp')
endif

subdir('kms++')

if get_option('v4l2').enabled()
Expand Down
5 changes: 5 additions & 0 deletions py/pykms/pykms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ using namespace kms;
using namespace std;

void init_pykmsbase(py::module& m);

#if HAS_KMSXXUTIL
void init_pykmsutils(py::module& m);
#endif

#if HAS_LIBDRM_OMAP
void init_pykmsomap(py::module& m);
Expand All @@ -18,7 +21,9 @@ PYBIND11_MODULE(pykms, m)
{
init_pykmsbase(m);

#if HAS_KMSXXUTIL
init_pykmsutils(m);
#endif

#if HAS_LIBDRM_OMAP
init_pykmsomap(m);
Expand Down

0 comments on commit 32b6f82

Please sign in to comment.