summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2022-05-29 12:58:49 +0000
committerSimon McVittie <smcv@collabora.com>2022-09-13 12:47:29 +0100
commita41ee157dde806e3cb018f4d7638e81354848f4c (patch)
treed96de7449c66b6c92594939fa6a6e480dca540cc
parenta817ff39d256133b12a9ef0bad6f736b2124148a (diff)
downloaddbus-a41ee157dde806e3cb018f4d7638e81354848f4c.tar.gz
cmake: Always try to find pkg-config
Commit 97bdefd4e2598e6ea72337acb4230928594bda81 move the include(FindPkgConfig) call into a Linux-specific codepath, so pkg-config was not being detected on FreeBSD. This mean that the check for PKG_CONFIG_FOUND to determine whether to install .pc files later on would always fail and .pc files were not installed on FreeBSD. (cherry picked from commit 82f5c966442a455edf0bae4fbc17e35abdf7db5e) Backported-from: dbus!280
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98904504..fc405d2c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,9 +144,13 @@ option(DBUS_DISABLE_ASSERT "Disable assertion checking" OFF)
option(DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
option(ENABLE_TRADITIONAL_ACTIVATION "Enable traditional activation (without using systemd)" ON)
+find_package(PkgConfig)
+
if(DBUS_LINUX)
add_auto_option(ENABLE_SYSTEMD "build with systemd at_console support" AUTO)
- include(FindPkgConfig)
+ if (NOT PKG_CONFIG_FOUND)
+ message(SEND_ERROR "pkg-config not found, this is required on Linux systems")
+ endif()
pkg_check_modules(SYSTEMD libsystemd>=209)
if(NOT SYSTEMD_FOUND)
pkg_check_modules(SYSTEMD libsystemd-login>=32 libsystemd-daemon>=32 libsystemd-journal>=32)