Skip to content

Commit

Permalink
Merge pull request #224 from luvit/up
Browse files Browse the repository at this point in the history
update openssl to 1.1.1d
  • Loading branch information
zhaozg committed Jan 23, 2020
2 parents 60b226e + 76bdeb6 commit 2efa4e3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ if(DEFINED ENV{LUA_COMPAT53_DIR})
set(LUA_COMPAT53_DIR $ENV{LUA_COMPAT53_DIR})
endif()
include_directories(${LUA_COMPAT53_DIR})
include_directories(${LUA_COMPAT53_DIR}/c-api)

if (WithOpenSSL)
include(deps/openssl.cmake)
Expand Down
14 changes: 7 additions & 7 deletions deps/openssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,35 @@ else (WithSharedOpenSSL)
set(OPENSSL_CONFIGURE_COMMAND ./config ${OPENSSL_CONFIG_OPTIONS})
set(OPENSSL_BUILD_COMMAND make)
endif()

ExternalProject_Add(openssl
PREFIX openssl
URL https://www.openssl.org/source/openssl-1.1.1b.tar.gz
URL_HASH SHA256=5c557b023230413dfb0756f3137a13e6d726838ccd1430888ad15bfb2b43ea4b
URL https://www.openssl.org/source/openssl-1.1.1d.tar.gz
URL_HASH SHA256=1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
LOG_BUILD ON
BUILD_IN_SOURCE YES
BUILD_COMMAND ${OPENSSL_BUILD_COMMAND}
CONFIGURE_COMMAND ${OPENSSL_CONFIGURE_COMMAND}
INSTALL_COMMAND ""
TEST_COMMAND ""
)

set(OPENSSL_DIR ${CMAKE_BINARY_DIR}/openssl/src/openssl)
set(OPENSSL_INCLUDE ${OPENSSL_DIR}/include)

if(WIN32)
set(OPENSSL_LIB_CRYPTO ${OPENSSL_DIR}/libcrypto.lib)
set(OPENSSL_LIB_SSL ${OPENSSL_DIR}/libssl.lib)
else()
set(OPENSSL_LIB_CRYPTO ${OPENSSL_DIR}/libcrypto.a)
set(OPENSSL_LIB_SSL ${OPENSSL_DIR}/libssl.a)
endif()

add_library(openssl_ssl STATIC IMPORTED)
set_target_properties(openssl_ssl PROPERTIES IMPORTED_LOCATION ${OPENSSL_LIB_SSL})
add_library(openssl_crypto STATIC IMPORTED)
set_target_properties(openssl_crypto PROPERTIES IMPORTED_LOCATION ${OPENSSL_LIB_CRYPTO})

include_directories(${OPENSSL_INCLUDE})
list(APPEND LIB_LIST openssl_ssl openssl_crypto)
endif (WithSharedOpenSSL)
Expand Down
2 changes: 1 addition & 1 deletion src/luvi.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#endif

#if (LUA_VERSION_NUM!=503)
#include "c-api/compat-5.3.h"
#include "compat-5.3.h"
#endif

#ifdef WITH_OPENSSL
Expand Down
4 changes: 2 additions & 2 deletions src/luvi_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define lutf8lib_c

#include "luvi.h"
#include "c-api/compat-5.3.h"
#include "c-api/compat-5.3.c"
#include "compat-5.3.h"
#include "compat-5.3.c"

#include "lprefix.h"
#include "lstrlib.c"
Expand Down

0 comments on commit 2efa4e3

Please sign in to comment.