summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2018-09-30 20:09:49 +0200
committerChristian Beier <dontmind@freeshell.org>2018-09-30 20:16:24 +0200
commit6566ba5f0261ad350d8371b17b380174926495d6 (patch)
tree82f8c3a9c538f70cbba8937bb4bdb2a6ecfaf636
parent7063f607e4d6ab26dc0c67d628caea785888d7a0 (diff)
downloadlibtdevnc-6566ba5f0261ad350d8371b17b380174926495d6.tar.gz
libtdevnc-6566ba5f0261ad350d8371b17b380174926495d6.zip
CMake: require some form of hton64() for websockets
Closes #127
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 958638b..727c970 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ cmake_policy(SET CMP0037 NEW)
project(LibVNCServer)
include(CheckFunctionExists)
+include(CheckSymbolExists)
include(CheckIncludeFile)
include(CheckTypeSize)
include(TestBigEndian)
@@ -177,6 +178,9 @@ check_function_exists(strdup LIBVNCSERVER_HAVE_STRDUP)
check_function_exists(strerror LIBVNCSERVER_HAVE_STRERROR)
check_function_exists(strstr LIBVNCSERVER_HAVE_STRSTR)
+check_symbol_exists(htobe64 "endian.h" LIBVNCSERVER_HAVE_HTOBE64)
+check_symbol_exists(OSSwapHostToBigInt64 "libkern/OSByteOrder.h" LIBVNCSERVER_HAVE_OSSWAPHOSTTOBIGINT64)
+
if(Threads_FOUND)
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
endif(Threads_FOUND)
@@ -220,9 +224,9 @@ if(LIBVNCSERVER_HAVE_SYS_UIO_H)
endif(LIBVNCSERVER_HAVE_SYS_UIO_H)
-if(WITH_WEBSOCKETS AND LIBVNCSERVER_HAVE_CRYPTO)
+if(WITH_WEBSOCKETS AND LIBVNCSERVER_HAVE_CRYPTO AND (LIBVNCSERVER_HAVE_HTOBE64 OR LIBVNCSERVER_HAVE_OSSWAPHOSTTOBIGINT64))
set(LIBVNCSERVER_WITH_WEBSOCKETS 1)
-endif(WITH_WEBSOCKETS AND LIBVNCSERVER_HAVE_CRYPTO)
+endif()
if(WITH_GCRYPT AND LIBGCRYPT_LIBRARIES)
message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}")