Skip to content

add meson option to build only the library #962

@rursprung

Description

@rursprung

Is your feature request related to a problem? Please describe.
as per the README it should be possible to build only the library:

aravis/README.md

Lines 48 to 49 in bf96964

It is perfectly possible to only build the library, reducing the dependencies to
the bare minimum.

and while it's possible to pass -Dviewer=disabled -Dgst-plugin=disabled it still builds arv-tool & co. because this is done unconditionally:

aravis/src/meson.build

Lines 322 to 336 in bf96964

progs = [
[ 'arv-tool', 'arvtool.c'],
[ 'arv-test', ['arvtest.c'] + arv_test_resources],
[ 'arv-camera-test', 'arvcameratest.c'],
[ 'arv-fake-gv-camera', 'arvfakegvcamera.c'],
]
foreach p: progs
executable ((p[0] + '-@0@').format (aravis_api_version),
p[1],
link_with: aravis_library,
c_args: library_c_args,
dependencies: aravis_dependencies,
install: true)
endforeach

Describe the solution you'd like
a new config option is introduced to suppress the build of executables (probably should be a default-enabled option build-tools or similar or maybe even one option per tool?)

Describe alternatives you've considered
n/a

Additional context
i noticed this while packaging up aravis for vcpkg (where it's only used as a library dependency of other things, so no binaries should be built/installed): microsoft/vcpkg#42351

in vcpkg the CI fails because it expects that there are no executables present. it'd be great if this could be added here as a config option, alternatively i'll have to provide a patch in vcpkg which will remove this part of the meson build (it'd be better to have it here upstream rather than having a downstream patch)

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. EnhancementIssues that propose improvements to existing features5. BuildIssue in building Aravis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions