BastionGuard/src/rootguard/docs/CMAKE_INTEGRATION.md

930 B

Native BastionGuard CMake integration

RootGuard is a regular CMake subdirectory at src/rootguard. Do not wrap it in ExternalProject_Add and do not create a staged Meson installation.

Place the contents of:

src/rootguard/integration/CMakeLists.rootguard.fragment.txt

after the main add_executable(BastionGuard ...) declaration.

The module creates:

  • bastionguard-rootguard;
  • bastionguard-rootguard-action;
  • bastionguard-rootguard-gtk;
  • alias BastionGuard::RootGuardUI.

The main target links to the alias. Its public build include directory is the parent of src/rootguard, allowing:

#include "rootguard/RootGuardPage.hpp"

All backend, polkit, policy and selected init-system install rules are inherited by the normal top-level cmake --install operation. Existing /etc/bastionguard/rootguard.conf is preserved; the packaged reference is installed as rootguard.conf.default.