non-openssl: only check for openssl ecdh in openssl builds

See also
https://github.com/warmcat/libwebsockets/issues/559

Signed-off-by: Karl Palsson <karlp@etactica.com>
This commit is contained in:
Karl Palsson 2016-06-06 15:03:09 +00:00 committed by Andy Green
parent f6f2dfc7fd
commit 27b7055ac6

View file

@ -799,7 +799,6 @@ if (LWS_WITH_SSL)
include_directories("${OPENSSL_INCLUDE_DIRS}")
list(APPEND LIB_LIST ${OPENSSL_LIBRARIES})
endif()
# older (0.98) Openssl lacks this
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
@ -808,6 +807,7 @@ if (LWS_WITH_SSL)
if (LWS_SSL_SERVER_WITH_ECDH_CERT AND NOT LWS_HAVE_OPENSSL_ECDH_H)
message(FATAL_ERROR "Missing openssl/ecdh.h, so cannot use LWS_SSL_SERVER_WITH_ECDH_CERT")
endif()
endif()
endif(LWS_WITH_SSL)