How to build only libaravis

Hello, there.

I would like to compile only libaravis without the UI, and I read in the README that “It is perfectly possible to only build the library, reducing the dependencies to the bare minimum.”

How exactly do you do about doing this? I was unable to find any documentation anywhere.

I am building inside a Docker container in order to use in a headless mode, which is why I would like to be able to do this.

Thank you!

Hi,

Welcome here !

If you are using aravis 0.6.x, have a lookt at the output of ./configure --help. You should be able to only compile the aravis library using:

configure --disable-viewer --disable-gst-plugin --disable-gtk-doc --disable-introspection

If you are testing the 0.7.x unstable branch, configuration is done during the creation of the build directory using meson:

meson -Dviewer=false -Dintrospection=false -Dgst-plugin=false -Ddocumentation=false build-directory

Cheers.

Thank you for the quick response! Much appreciated.

One last question, please.

Is the param “build-directory” the path to the actual build directory e.g. “/opt/aravis/build”?

Yes, build-directory is the build directory :slight_smile:

When you invoke meson build in the top source directory, it will create a directory named build. Then you will have to go to his directory, then invoke ninja. Something like that:

cd /path/to/aravis/sources
meson build
cd build
ninja
ninja install

By default, the installation path is /usr/local. It can be changed using -Dprefix=/your/prefix.