Build and Install

uatools ships two coexisting build systems: waf (the ELT project convention) and CMake. They produce identical artefacts and install them to the same prefix layout, so downstream consumers can pick either.

Prerequisites

C++ runtime:

  • C++20 compiler (GCC 11+ or Clang 13+)

  • ifw-fnd.defs (the ICommAdapter + Logger contracts that ualib implements)

  • open62541 >= 1.3 (private dependency — vendored inside ualib, hidden from downstream consumers via PIMPL)

  • fmt, yaml-cpp

  • gtest + gmock (for the test binary, optional at build time)

  • ncurses (for the UaClient watch ncurses TUI)

ualib does not depend on log4cplus, CII, rad, or ifw-core. Logging is dispatched through ifw-fnd’s abstract Logger interface that downstream applications install at startup (see “Logging” in the Overview chapter).

Python tools:

  • Python 3.10+

  • asyncua, numpy, PyYAML

  • PyQt6, pyqtgraph (only for UaExplorer / UaPlot)

waf build

cd uatools
waf configure
waf build
waf install

The configure step probes the C++ third-party packages and the required Python modules. PyQt6/pyqtgraph are treated as soft- required: missing them yields a warning but does not fail the build, so headless tools (UaShell, UaTstServer) and the C++ libraries still install.

Targets produced:

  • libuatoolsUalib.so - $PREFIX/lib64/

  • libuatoolsItestSrv.so - $PREFIX/lib64/ (server engine for UaItestServer and for in-process gtest fixtures)

  • UaClient, UaItestServer - $PREFIX/bin/

  • UaExplorer, UaPlot, UaShell, UaSubscription, UaTstServer - $PREFIX/bin/

  • eso.uatools.tools.uaplot Python package - $PREFIX/lib/python3.X/site-packages/eso/uatools/tools/uaplot/

  • C++ headers - $PREFIX/include/eso/uatools/{ualib,itest}/

  • UaExplorer images - $PREFIX/share/image/uatools/

  • waf dependency files - $PREFIX/share/wdep/uatools.{ualib,itest.lib}.wdep

Downstream waf projects depend on the library via use='uatools.ualib' (together with ifw-fnd.defs for the contract types).

CMake build

cd uatools
cmake -B build-cmake -S .
cmake --build build-cmake -j
cmake --install build-cmake

If -DCMAKE_INSTALL_PREFIX is not given, the project takes $INTROOT if set, otherwise $PREFIX, falling back to CMake’s default (/usr/local). Use a build directory distinct from the waf build/; build-cmake/ is conventional.

C++ targets and install layout match the waf build (same library file names, same header paths). The CMake build also generates the pkg-config file:

  • uatools.pc - $PREFIX/lib64/pkgconfig/

Downstream CMake projects depend on the libraries via pkg-config:

find_package(PkgConfig REQUIRED)
pkg_check_modules(UATOOLS REQUIRED uatools)

The gtest suite is not built by the CMake path — tests are driven through waf (waf test --alltests) and through the robot suites under test/uatools/. CMake builds the libraries + the UaItestServer binary needed by VLTSW consumers; the test suite machinery stays in the primary build system.

A robot test guards the CMake build itself: see test/uatools/src/cmake_build.robot and the sister suite at ifw-fnd/test/fnd/src/cmake_build.robot — together they fail loudly whenever the CMake build drifts from the waf side.