always build feature complete
- throw an error if a compile dependancy is not fullfilled - add options to disable hard compile dependancies
This commit is contained in:
parent
ef114a1cd3
commit
28b29179f4
|
@ -56,10 +56,15 @@ set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
# Find microhttpd
|
# Find microhttpd
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
option(MICROHTTPD_REQUIRED "Enable or disable the requirement of microhttp (http deamon)" ON)
|
||||||
find_library(MHTD NAMES microhttpd)
|
find_library(MHTD NAMES microhttpd)
|
||||||
if("${MHTD}" STREQUAL "MHTD-NOTFOUND")
|
if("${MHTD}" STREQUAL "MHTD-NOTFOUND")
|
||||||
message(STATUS "microhttpd NOT found: disable http server")
|
if(MICROHTTPD_REQUIRED)
|
||||||
add_definitions("-DCONF_NO_HTTPD")
|
message(FATAL_ERROR "microhttpd NOT found: use `-DMICROHTTPD_REQUIRED=OFF` to build without http deamon support")
|
||||||
|
else()
|
||||||
|
message(STATUS "microhttpd NOT found: disable http server")
|
||||||
|
add_definitions("-DCONF_NO_HTTPD")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(LIBS ${LIBS} ${MHTD})
|
set(LIBS ${LIBS} ${MHTD})
|
||||||
endif()
|
endif()
|
||||||
|
@ -68,11 +73,19 @@ endif()
|
||||||
# Find OpenSSL
|
# Find OpenSSL
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
option(OpenSSL_REQUIRED "Enable or disable the requirement of OpenSSL" ON)
|
||||||
find_package(OpenSSL)
|
find_package(OpenSSL)
|
||||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
if(OPENSSL_FOUND)
|
||||||
set(LIBS ${LIBS} ${OPENSSL_LIBRARIES})
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||||
if(NOT OPENSSL_FOUND)
|
set(LIBS ${LIBS} ${OPENSSL_LIBRARIES})
|
||||||
add_definitions("-DCONF_NO_TLS")
|
else()
|
||||||
|
if(OpenSSL_REQUIRED)
|
||||||
|
message(FATAL_ERROR "OpenSSL NOT found: use `-DOpenSSL_REQUIRED=OFF` to build without SSL support")
|
||||||
|
else()
|
||||||
|
if(NOT OPENSSL_FOUND)
|
||||||
|
add_definitions("-DCONF_NO_TLS")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in New Issue