start SSL
This commit is contained in:
+20
-1
@@ -62,6 +62,7 @@ check_function_exists(pselect HAVE_PSELECT)
|
||||
check_function_exists(ppoll HAVE_PPOLL)
|
||||
check_include_file(linux/serial.h HAVE_LINUX_SERIAL -DHAVE_LINUX_SERIAL=1)
|
||||
check_include_file(dev/usb/uftdiio.h HAVE_FREEBSD_UFTDI -DHAVE_FREEBSD_UFTDI=1)
|
||||
|
||||
check_function_exists(argp_parse HAVE_ARGP)
|
||||
if(NOT HAVE_ARGP)
|
||||
find_library(LIB_ARGP argp)
|
||||
@@ -77,11 +78,13 @@ if(NOT coverage STREQUAL OFF)
|
||||
link_libraries(gcov)
|
||||
message(STATUS "coverage enabled")
|
||||
endif(NOT coverage STREQUAL OFF)
|
||||
|
||||
option(contrib "disable inclusion of contributed sources." ON)
|
||||
if(contrib STREQUAL ON)
|
||||
set(HAVE_CONTRIB ON)
|
||||
message(STATUS "contrib enabled")
|
||||
endif(contrib STREQUAL ON)
|
||||
|
||||
find_library(HAVE_MQTT mosquitto)
|
||||
if(HAVE_MQTT)
|
||||
option(mqtt "disable support for MQTT handling." ON)
|
||||
@@ -90,7 +93,23 @@ if(HAVE_MQTT)
|
||||
else(mqtt STREQUAL ON)
|
||||
unset(HAVE_MQTT)
|
||||
endif(mqtt STREQUAL ON)
|
||||
endif(HAVE_MQTT)
|
||||
endif(HAVE_MQTT)
|
||||
|
||||
find_library(HAVE_SSL ssl)
|
||||
find_library(LIB_CRYPTO crypto)
|
||||
if(HAVE_SSL)
|
||||
if(LIB_CRYPTO)
|
||||
option(ssl "disable support for SSL." ON)
|
||||
if(ssl STREQUAL ON)
|
||||
message(STATUS "SSL enabled")
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${HAVE_SSL} ${LIB_CRYPTO}")
|
||||
else(ssl STREQUAL ON)
|
||||
unset(HAVE_SSL)
|
||||
endif(ssl STREQUAL ON)
|
||||
else(LIB_CRYPTO)
|
||||
message(FATAL_ERROR "crypto library not available")
|
||||
endif(LIB_CRYPTO)
|
||||
endif(HAVE_SSL)
|
||||
|
||||
check_cxx_source_runs("
|
||||
#include <stdint.h>
|
||||
|
||||
Reference in New Issue
Block a user