Unverified Commit 882ba63d authored by Dominik Charousset's avatar Dominik Charousset Committed by GitHub

Merge pull request #687

Improve cross compilation support
parents 6a846488 7f11b878
......@@ -183,7 +183,7 @@ endif()
################################################################################
# check for g++ >= 4.8 or clang++ > = 3.2
if(NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK)
if(NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK AND NOT CMAKE_CROSSCOMPILING)
try_run(ProgramResult
CompilationSucceeded
"${CMAKE_CURRENT_BINARY_DIR}"
......@@ -547,6 +547,7 @@ if(NOT CAF_NO_OPENSSL)
"Disable OpenSSL. Required >= 1.0.1 due to TLSv1.2 support.")
set(CAF_NO_OPENSSL yes)
else()
if(NOT CMAKE_CROSSCOMPILING)
# Check if openssl headers and library versions match
set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
......@@ -564,6 +565,7 @@ if(NOT CAF_NO_OPENSSL)
message(FATAL_ERROR
"OpenSSL library version does not match headers")
endif()
endif()
include_directories(BEFORE ${OPENSSL_INCLUDE_DIR})
add_optional_caf_lib(openssl)
endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment