Merge pull request #73 from psychocrypt/topic-featureCompleteBuild

Topic feature complete build
This commit is contained in:
fireice-uk
2017-04-20 10:18:00 +01:00
committed by GitHub
2 changed files with 28 additions and 6 deletions
+9
View File
@@ -3,3 +3,12 @@ obj/
xmr-stak-cpu.layout
xmr-stak-cpu.depend
config-debug.txt
# netbeans project files
/nbproject/
# tmp files
*~
# merge original backup files
*.orig
+19 -6
View File
@@ -45,10 +45,15 @@ set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
# Find microhttpd
################################################################################
option(MICROHTTPD_REQUIRED "Enable or disable the requirement of microhttp (http deamon)" ON)
find_library(MHTD NAMES microhttpd)
if("${MHTD}" STREQUAL "MHTD-NOTFOUND")
message(STATUS "microhttpd NOT found: disable http server")
add_definitions("-DCONF_NO_HTTPD")
if(MICROHTTPD_REQUIRED)
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()
set(LIBS ${LIBS} ${MHTD})
endif()
@@ -57,11 +62,19 @@ endif()
# Find OpenSSL
###############################################################################
option(OpenSSL_REQUIRED "Enable or disable the requirement of OpenSSL" ON)
find_package(OpenSSL)
include_directories(${OPENSSL_INCLUDE_DIR})
set(LIBS ${LIBS} ${OPENSSL_LIBRARIES})
if(NOT OPENSSL_FOUND)
add_definitions("-DCONF_NO_TLS")
if(OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
set(LIBS ${LIBS} ${OPENSSL_LIBRARIES})
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()
################################################################################