LibMISB - Getting Started - How to compile
| LibMISB |
|---|
| Introduction |
| Supported Standards |
| Getting Started |
| Examples |
| Evaluating |
| Contact Us |
Dependencies
Your build environment will need the following packages installed in order to build LibMISB:
- jansson
- cpputest
- doxygen
- meson
apt-get Installation
sudo apt-get install \ cmake \ libjansson-dev \ cpputest \ doxygen \ python3 \ python3-pip \ pybind11-dev \ ninja-build
Meson Installation
Follow the next command to install Meson:
pip3 install --user 'meson' --force-reinstall
If meson doesn't work, try rebooting. Important: Meson version must be greater than or equal to 0.63.0. You can verify the Meson version with the following command:
meson --version
Pre-commit Installation
Run the following command:
pip3 install pre-commit
LibMISB
LibMISB is a Meson project. This makes it easy to build software packages for a variety of operating systems and platforms, including embedded devices.
Building LibMISB
You can run the following commands:
meson builddir --prefix=/usr ninja -C builddir
Specify meson --prefix $INSTALL_PATH the build if you want the build to be configured for installation in a directory other than /usr/local.
The following features are also available for configuration on the meson command by adding -Doption=value:
| Option | Description | Default Value |
|---|---|---|
| python | Build python bindings | disabled |
| examples | Build examples | enabled |
| docs | Build documentation with doxygen | enabled |
| tests | Build tests | enabled |
Installing the Binaries
Once the ninja -C build commands complete, you can install the generated binaries:
ninja -C builddir install
If you are trying to install to a system location, you will need to run with sudo privileges.
sudo ninja -C builddir install