Skip to content
Snippets Groups Projects
Commit 3df0f94f authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

cmake: enable static linking of OpenSSL if BUILD_STATIC is set

Currently, the BUILD_STATIC and BUILD_STATIC_WITH_BUNDLED_LIBS cmake
options don't enable static linking of the OpenSSL library so we have
to set OPENSSL_USE_STATIC_LIBS explicitly. Let's enable static linking
of OpenSSL by default because we enable it anyway in all our official
builds.

NO_DOC=build
NO_TEST=build
NO_CHANGELOG=build

(cherry picked from commit edadffd7)
parent c1327f2a
No related branches found
No related tags found
No related merge requests found
......@@ -450,6 +450,8 @@ endif()
# OpenSSL
#
option(OPENSSL_USE_STATIC_LIBS "Link OpenSSL statically"
${BUILD_STATIC})
set(ENABLE_BUNDLED_OPENSSL_DEFAULT OFF)
if(BUILD_STATIC_WITH_BUNDLED_LIBS AND OPENSSL_USE_STATIC_LIBS)
set(ENABLE_BUNDLED_OPENSSL_DEFAULT ON)
......@@ -850,6 +852,7 @@ set(options PACKAGE VERSION BUILD C_COMPILER CXX_COMPILER C_FLAGS CXX_FLAGS
ENABLE_DOC
ENABLE_DIST
ENABLE_BUNDLED_ZLIB
OPENSSL_USE_STATIC_LIBS
ENABLE_BUNDLED_OPENSSL
ENABLE_BUNDLED_LIBCURL
BUNDLED_LIBCURL_USE_ARES
......
......@@ -9,7 +9,6 @@ ExternalProject_Add(tarantool
# https://cmake.org/cmake/help/v3.4/module/GNUInstallDirs.html#special-cases
-DCMAKE_INSTALL_LOCALSTATEDIR=<INSTALL_DIR>/var
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DOPENSSL_USE_STATIC_LIBS=TRUE
-DBUILD_STATIC_WITH_BUNDLED_LIBS=TRUE
-DENABLE_DIST=TRUE
-DENABLE_HARDENING=${ENABLE_HARDENING}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment