LibMISB/Getting Started/How to compile: Difference between revisions
No edit summary |
|||
(18 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | |||
{{LibMISB/Head|previous=Getting Started/How to get the library|next=Examples|metakeywords=}} | |||
</noinclude> | |||
== Dependencies == | == Dependencies == | ||
Line 11: | Line 13: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
sudo apt-get install \ | sudo apt-get install \ | ||
cmake \ | |||
libjansson-dev \ | libjansson-dev \ | ||
cpputest \ | cpputest \ | ||
doxygen \ | doxygen \ | ||
python3 \ | python3 \ | ||
python3-pip \ | python3-pip \ | ||
ninja-build | ninja-build | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 31: | Line 34: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
meson --version | meson --version | ||
</syntaxhighlight> | |||
== Pre-commit Installation == | |||
Run the following command: | |||
<syntaxhighlight lang=bash> | |||
pip3 install pre-commit | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== LibMISB == | == LibMISB == | ||
LibMISB is a [https://mesonbuild.com/ Meson] project. This makes it easy to build software packages for a variety of operating systems and platforms, including embedded devices. | LibMISB is a [https://mesonbuild.com/ 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: | You can run the following commands: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
meson builddir | meson builddir --prefix=/usr | ||
ninja -C builddir | ninja -C builddir | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Specify meson --prefix $INSTALL_PATH build, if you want the build to be configured for installation in a directory other than /usr/local. | Specify <code>meson --prefix $INSTALL_PATH</code> build, if you want the build to be configured for installation in a directory other than <code>/usr/local</code>. | ||
== | The following features are also available for configuration on the meson command by adding <code>-Doption=value</code>: | ||
{| class="wikitable" | |||
|- | |||
! Option !! Description !! Default Value | |||
|- | |||
| examples || Build examples || enabled | |||
|- | |||
| docs || Build documentation with doxygen || enabled | |||
|- | |||
| tests || Build tests || enabled | |||
|} | |||
== Installing the Binaries == | |||
Once the ninja -C build commands completes, you can install the generated binaries: | Once the ninja -C build commands completes, you can install the generated binaries: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
Line 55: | Line 77: | ||
sudo ninja -C builddir install | sudo ninja -C builddir install | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<noinclude>{{LibMISB/Foot|Getting Started/How to get the library|Examples}}</noinclude> |
Latest revision as of 15:20, 28 August 2024
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 \ ninja-build
Meson Installation
Follow the next command to install Meson:
pip3 install --user 'meson<=0.60.3' --force-reinstall
If meson doesn't work, try reboot. Important: Meson version must be less or equal to 0.60.3. You can verify 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
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 |
---|---|---|
examples | Build examples | enabled |
docs | Build documentation with doxygen | enabled |
tests | Build tests | enabled |
Installing the Binaries
Once the ninja -C build commands completes, 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