diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-01-24 09:07:57 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-01-24 10:27:32 +0100 |
commit | 76ee7475c09ecb46586800251c30cdf2dec90f6b (patch) | |
tree | f5164c6cd3cf7a15732d550cab23d2b7d2bf8764 /CMakeLists.txt | |
parent | fdd429cd587737840a8ca08c2eb59b63423d4c3e (diff) | |
download | tigervnc-76ee7475c09ecb46586800251c30cdf2dec90f6b.tar.gz tigervnc-76ee7475c09ecb46586800251c30cdf2dec90f6b.zip |
Make systemd detection more robust
We don't need to look for this on Windows or macOS, and we need to be
able to gracefully handle systems without pkg-config.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6028fadf..f1bfd618 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -302,7 +302,12 @@ if(UNIX AND NOT APPLE) endif() # check for systemd support (socket activation) -pkg_check_modules(LIBSYSTEMD libsystemd) +if(UNIX AND NOT APPLE) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(LIBSYSTEMD libsystemd) + endif() +endif() # Generate config.h and make sure the source finds it configure_file(config.h.in config.h) |