Build and Install on Ubuntu

This guide describes the process of building and installing EasyNMEA on Ubuntu platforms:

Prerequisites

To build and install EasyNMEA, some external tools are required.

sudo apt update && sudo apt install -y \
    cmake \
    g++ \
    wget \
    git \
    python3-pip

Dependencies

EasyNMEA depends on Asio, a cross-platform C++ library for network and low-level I/O programming that provides a consistent asynchronous model, which is used to interact with the serial ports. This can be installed with:

sudo apt update && sudo apt install -y libasio-dev

Build

Once the prerequisites and dependencies are installed, EasyNMEA can be built with the help of CMake by running:

cd ~
git clone https://github.com/EduPonz/easynmea.git
cd easynmea
mkdir build && cd build
cmake ..
cmake --build .

Note

For more information about compilation options please refer to CMake Options.

Install

Once the library is built, in can be installed in a user specified directory with:

cd ~/easynmea/build
cmake .. -DCMAKE_INSTALL_PREFIX=<user-specified-dir>
cmake --build . --target install

Alternatively, it can also be installed system-wide with:

cd ~/easynmea/build
cmake ..
cmake --build . --target install