summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2024-04-17 07:03:32 -0400
committerGitHub <noreply@github.com>2024-04-17 07:03:32 -0400
commitca6b72c06ae731d30567ef63d6b033619c6f03f1 (patch)
treeb6884cc5c4849ebe79710d29a16aaa46c7fd43a2
parentcee3533b4d148bebd623e8c8c4dbf3d9687ca15d (diff)
Explicitly require systemd for systemd journal plugin. (#17313)
Without this change, it doesn’t fail until the build itself if the plugin is enabled but systemd could not be found.
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
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)