File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ endif()
3030message (STATUS "CMake build type: ${CMAKE_BUILD_TYPE} " )
3131# Config of some libraries (e.g. replxx) depends on the build type.
3232string (TOLOWER "${CMAKE_BUILD_TYPE} " CMAKE_BUILD_TYPE_LOWERCASE)
33+ # Enable explicit static linking of SSL because of generic Linux binary.
34+ set (MGCONSOLE_STATIC_SSL OFF CACHE STRING "Statically link SSL" )
3335
3436# Set default instalation directory to '/usr'
3537if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
@@ -39,7 +41,6 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
3941endif ()
4042
4143add_subdirectory (src)
42-
4344if (BUILD_TESTING)
4445 add_subdirectory (tests)
4546endif ()
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ To build and install mgconsole from source you will need:
1111 - CMake version >= 3.4
1212 - OpenSSL version >= 1.0.2
1313 - C compiler supporting C11
14- - C++ compiler supporting C++17
14+ - C++ compiler supporting C++20
1515
1616To install compile dependencies on Debian / Ubuntu:
1717
Original file line number Diff line number Diff line change @@ -30,12 +30,10 @@ find_package(Threads REQUIRED)
3030set (CMAKE_THREAD_PREFER_PTHREAD TRUE )
3131set (THREADS_PREFER_PTHREAD_FLAG TRUE )
3232
33- if (NOT MGCONSOLE_ON_LINUX)
33+ if (NOT MGCONSOLE_ON_LINUX OR MGCONSOLE_STATIC_SSL )
3434 set (OPENSSL_USE_STATIC_LIBS TRUE )
3535endif ()
36-
3736find_package (OpenSSL REQUIRED)
38-
3937if (MGCONSOLE_ON_OSX)
4038 set (MACOSX_OPENSSL_ROOTDIR_FLAG "-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} " )
4139endif ()
You can’t perform that action at this time.
0 commit comments