summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12367ec..8e1839c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,7 @@ find_package(GnuTLS)
find_package(Threads)
find_package(X11)
find_package(OpenSSL)
+find_package(PkgConfig)
find_library(LIBGCRYPT_LIBRARIES gcrypt)
# Check whether the version of libjpeg we found was libjpeg-turbo and print a
@@ -102,6 +103,17 @@ if(PNG_FOUND)
endif(PNG_FOUND)
option(LIBVNCSERVER_ALLOW24BPP "Allow 24 bpp" ON)
+pkg_check_modules(SYSTEMD "libsystemd")
+if(SYSTEMD_FOUND)
+ option(LIBVNCSERVER_WITH_SYSTEMD "Build with systemd socket activation support" ON)
+endif(SYSTEMD_FOUND)
+
+if(LIBVNCSERVER_WITH_SYSTEMD)
+ add_definitions(-DLIBVNCSERVER_WITH_SYSTEMD)
+ include_directories(${SYSTEMD_INCLUDE_DIRS})
+ set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${SYSTEMD_LIBRARIES})
+endif(LIBVNCSERVER_WITH_SYSTEMD)
+
if(GNUTLS_FOUND)
set(LIBVNCSERVER_WITH_CLIENT_TLS 1)
option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (gnutls)" ON)