Skip to content

Commit

Permalink
Merge pull request ruslo#1115 from ruslo/pr.openssl
Browse files Browse the repository at this point in the history
Fix OpenSSL 1.1.0+ (Windows)
  • Loading branch information
ruslo authored Oct 25, 2017
2 parents 783c222 + 1b0d027 commit 73d5068
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
7 changes: 1 addition & 6 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ hunter_config(OpenCL-cpp VERSION 2.0.10-p0)
hunter_config(OpenCV VERSION 3.3.0-p2)
hunter_config(OpenCV-Extra VERSION 3.3.0)
hunter_config(OpenNMTTokenizer VERSION 0.2.0-p1)
if(MSVC)
# FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470
hunter_config(OpenSSL VERSION 1.0.2l)
else()
hunter_config(OpenSSL VERSION 1.1.0f)
endif()
hunter_config(OpenSSL VERSION 1.1.0f)
hunter_config(PNG VERSION 1.6.26-p1)
hunter_config(PocoCpp VERSION 1.7.9-p0)
hunter_config(PostgreSQL VERSION 10.0.0)
Expand Down
11 changes: 11 additions & 0 deletions cmake/find/FindOpenSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ if(WIN32 AND NOT CYGWIN)

find_library(LIB_EAY_DEBUG
NAMES
libcrypto${_OPENSSL_MSVC_RT_MODE}d
libcryptod
libeay32${_OPENSSL_MSVC_RT_MODE}d
libeay32d
cryptod
HINTS
"${OPENSSL_ROOT}"
PATH_SUFFIXES
Expand All @@ -128,8 +131,11 @@ if(WIN32 AND NOT CYGWIN)

find_library(LIB_EAY_RELEASE
NAMES
libcrypto${_OPENSSL_MSVC_RT_MODE}
libcrypto
libeay32${_OPENSSL_MSVC_RT_MODE}
libeay32
crypto
HINTS
"${OPENSSL_ROOT}"
PATH_SUFFIXES
Expand All @@ -138,8 +144,11 @@ if(WIN32 AND NOT CYGWIN)

find_library(SSL_EAY_DEBUG
NAMES
libssl${_OPENSSL_MSVC_RT_MODE}d
libssld
ssleay32${_OPENSSL_MSVC_RT_MODE}d
ssleay32d
ssld
HINTS
"${OPENSSL_ROOT}"
PATH_SUFFIXES
Expand All @@ -148,6 +157,8 @@ if(WIN32 AND NOT CYGWIN)

find_library(SSL_EAY_RELEASE
NAMES
libssl${_OPENSSL_MSVC_RT_MODE}
libssl
ssleay32${_OPENSSL_MSVC_RT_MODE}
ssleay32
ssl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ else()
set(log_opts "")
endif()

set(openssl_dir "@HUNTER_PACKAGE_INSTALL_PREFIX@/ssl")
file(MAKE_DIRECTORY "${openssl_dir}")

ExternalProject_Add(
"@HUNTER_EP_NAME@"
URL
Expand All @@ -87,15 +90,16 @@ ExternalProject_Add(
CONFIGURE_COMMAND
"@HUNTER_MSVC_VCVARSALL@" "@HUNTER_MSVC_ARCH@"
COMMAND
perl Configure "${opt}" "--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@"
perl Configure "${opt}" no-asm "--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@" "--openssldir=${openssl_dir}"
COMMAND
nmake
COMMAND
nmake install
BUILD_COMMAND
"@CMAKE_COMMAND@" -E echo "Dummy build step"
BUILD_IN_SOURCE
1
INSTALL_COMMAND
COMMAND
nmake install
COMMAND # Copy license files
"@CMAKE_COMMAND@"
"-C@HUNTER_ARGS_FILE@" # for 'HUNTER_INSTALL_LICENSE_FILES'
"-Dsrcdir=@HUNTER_PACKAGE_SOURCE_DIR@"
Expand Down

0 comments on commit 73d5068

Please sign in to comment.