From ca6b72c06ae731d30567ef63d6b033619c6f03f1 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Wed, 17 Apr 2024 07:03:32 -0400 Subject: Explicitly require systemd for systemd journal plugin. (#17313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this change, it doesn’t fail until the build itself if the plugin is enabled but systemd could not be found. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d27656b55..ebaf2058c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1842,6 +1842,10 @@ if(ENABLE_PLUGIN_CGROUP_NETWORK) endif() if(ENABLE_PLUGIN_SYSTEMD_JOURNAL) + if(NOT SYSTEMD_FOUND) + message(FATAL_ERROR "Systemd journal plugin requires systemd, but systemd was not found.") + endif() + add_executable(systemd-journal.plugin ${SYSTEMD_JOURNAL_PLUGIN_FILES}) target_link_libraries(systemd-journal.plugin libnetdata) -- cgit v1.2.3