summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCHris B <cb@shoutr.net>2017-01-28 17:34:42 +0100
committerCHris B <cb@shoutr.net>2017-01-28 17:34:42 +0100
commit882c8f34779ac88a544d3020a90a677042fa7067 (patch)
treed9284ff4d6a16ded4c43d7c173ed6c4c331b1153 /CMakeLists.txt
parentd08fd0182da1ea861ef399a115efd85b698d65d0 (diff)
downloadlibtdevnc-882c8f34779ac88a544d3020a90a677042fa7067.tar.gz
libtdevnc-882c8f34779ac88a544d3020a90a677042fa7067.zip
CMake: fix build system generation when zlib or OpenSSL not found
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e658976..060fd0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,6 +151,8 @@ if(Threads_FOUND)
endif(Threads_FOUND)
if(ZLIB_FOUND)
set(LIBVNCSERVER_HAVE_LIBZ 1)
+else()
+ unset(ZLIB_LIBRARIES) # would otherwise contain -NOTFOUND, confusing target_link_libraries()
endif(ZLIB_FOUND)
if(JPEG_FOUND)
set(LIBVNCSERVER_HAVE_LIBJPEG 1)
@@ -158,8 +160,9 @@ endif(JPEG_FOUND)
if(PNG_FOUND)
set(LIBVNCSERVER_HAVE_LIBPNG 1)
endif(PNG_FOUND)
-
-
+if(NOT OPENSSL_FOUND)
+ unset(OPENSSL_LIBRARIES) # would otherwise contain -NOTFOUND, confusing target_link_libraries()
+endif()
if(SYSTEMD_FOUND)
add_definitions(-DLIBVNCSERVER_WITH_SYSTEMD)
include_directories(${SYSTEMD_INCLUDE_DIRS})