diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index e78085d160..6186b1f89d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -84,8 +84,7 @@ hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p1) hunter_config(OpenCV-Extra VERSION 3.0.0) hunter_config(OpenNMTTokenizer VERSION 0.2.0-p1) -if(MSVC OR ANDROID) - # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184 +if(MSVC) # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 hunter_config(OpenSSL VERSION 1.0.2l) else() diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 9f64f330f2..e362a85ae2 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -307,4 +307,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "10") +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "11") diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in index 9dab730282..fe44b5c527 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in @@ -31,6 +31,12 @@ hunter_test_string_not_empty("@HUNTER_GLOBAL_SCRIPT_DIR@") if(APPLE) set(configure_command "./Configure") set(configure_opts "darwin64-x86_64-cc") +elseif(ANDROID) + # Using the ./config script is currently broken with -no* CFLAGS on ALL versions + # * https://github.com/openssl/openssl/issues/3493 + # * https://github.com/openssl/openssl/blob/OpenSSL_1_1_0-stable/Configure#L560 + # * https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_.26_Config + set(configure_command "./Configure") else() set(configure_command "./config") endif() @@ -54,12 +60,24 @@ if(ANDROID) # * https://wiki.openssl.org/index.php/Android#Build_the_OpenSSL_Library # Set environment variables similar to 'setenv-android.sh' script: # * https://wiki.openssl.org/index.php/Android#Adjust_the_Cross-Compile_Script - set(configure_command - # Ignored. Prevents script from checking host uname - RELEASE=2.6.37 - SYSTEM=android - ARCH=${ANDROID_SSL_ARCH} - ${configure_command}) + + # Using documented method (./config script): + #set(configure_command + # Ignored. Prevents ./config from checking host uname + # RELEASE=2.6.37 + # SYSTEM=android + # ARCH=${CMAKE_ANDROID_ARCH} + # ${configure_command}) + + # Using android-* targets is currently broken for Clang on ALL versions + # * https://github.com/openssl/openssl/pull/2229 + # The ./config script only detects Android x86 and armv7 targets anyway. + # * https://github.com/openssl/openssl/issues/2490 + if (ANDROID_SSL_ARCH MATCHES "mips64|arm64|x86_64") + set(configure_opts "linux-generic64") + else() + set(configure_opts "linux-generic32") + endif() endif() # Pass C compiler through