summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKyle Russell <bkylerussell@gmail.com>2016-09-07 14:49:48 -0400
committerKyle Russell <bkylerussell@gmail.com>2016-09-21 23:04:05 -0400
commit21fd4d27bb248d506b37c3c43969f3db2f67c820 (patch)
tree5874a7b0662530eb820d642d096f45844a878c45 /CMakeLists.txt
parent1f8c443cbc439e79d9e2c8b92643b65b7332db89 (diff)
downloadlibtdevnc-21fd4d27bb248d506b37c3c43969f3db2f67c820.tar.gz
libtdevnc-21fd4d27bb248d506b37c3c43969f3db2f67c820.zip
Support systemd socket activation
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)