libsystemd/255.2

System and Service Manager API library
Recipe info
LGPL-2.1-or-later
2024-01-31

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
libsystemd/255.2

Using libsystemd

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
libsystemd/255.2
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("libsystemd/255.2")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): libsystemd
  • CMake target name(s): libsystemd::libsystemd
  • pkg-config file name(s): libsystemd.pc

A simple use case using the CMake file name and the global target:

# ...
find_package(libsystemd REQUIRED)
# ...
target_link_libraries(YOUR_TARGET libsystemd::libsystemd)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the libsystemd homepage listed above:

#include "systemd/_sd-common.h"
#include "systemd/sd-bus-protocol.h"
#include "systemd/sd-bus-vtable.h"
#include "systemd/sd-bus.h"
#include "systemd/sd-daemon.h"
#include "systemd/sd-device.h"
#include "systemd/sd-dhcp-client.h"
#include "systemd/sd-dhcp-lease.h"
#include "systemd/sd-dhcp-option.h"
#include "systemd/sd-dhcp-protocol.h"
#include "systemd/sd-dhcp-server.h"
#include "systemd/sd-dhcp6-client.h"
#include "systemd/sd-dhcp6-lease.h"
#include "systemd/sd-dhcp6-option.h"
#include "systemd/sd-dhcp6-protocol.h"
#include "systemd/sd-event.h"
#include "systemd/sd-gpt.h"
#include "systemd/sd-hwdb.h"
#include "systemd/sd-id128.h"
#include "systemd/sd-ipv4acd.h"
#include "systemd/sd-ipv4ll.h"
#include "systemd/sd-journal.h"
#include "systemd/sd-lldp-rx.h"
#include "systemd/sd-lldp-tx.h"
#include "systemd/sd-lldp.h"
#include "systemd/sd-login.h"
#include "systemd/sd-messages.h"
#include "systemd/sd-ndisc.h"
#include "systemd/sd-netlink.h"
#include "systemd/sd-network.h"
#include "systemd/sd-path.h"
#include "systemd/sd-radv.h"
#include "systemd/sd-resolve.h"
#include "systemd/sd-utf8.h"