Mercurial > hg > orthanc
changeset 3725:8060880d5e66
fix openssl
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Mar 2020 10:56:24 +0100 |
parents | f29a75a3190a |
children | 7b7ca203f1a3 |
files | Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake |
diffstat | 1 files changed, 14 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake Fri Mar 06 10:47:41 2020 +0100 +++ b/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake Fri Mar 06 10:56:24 2020 +0100 @@ -11,12 +11,10 @@ DownloadPackage(${OPENSSL_MD5} ${OPENSSL_URL} "${OPENSSL_SOURCES_DIR}") if (FirstRun) - file(WRITE ${AUTOGENERATED_DIR}/openssl_cversion.c " -#include \"internal/cryptlib.h\" -unsigned long OpenSSL_version_num(void) -{ - return OPENSSL_VERSION_NUMBER; -} + file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/buildinf.h " +#define DATE \"\" +#define PLATFORM \"\" +#define compiler_flags \"\" ") file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/include/internal/bn_conf.h "") file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/include/internal/dso_conf.h "") @@ -179,8 +177,6 @@ AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES) endforeach() -list(APPEND OPENSSL_SOURCES ${AUTOGENERATED_DIR}/openssl_cversion.c) - list(REMOVE_ITEM OPENSSL_SOURCES ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c @@ -191,7 +187,6 @@ ${OPENSSL_SOURCES_DIR}/crypto/aes/aes_x86core.c ${OPENSSL_SOURCES_DIR}/crypto/armcap.c ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_dgram.c - ${OPENSSL_SOURCES_DIR}/crypto/cversion.c ${OPENSSL_SOURCES_DIR}/crypto/des/ncbc_enc.c ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256.c ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256_table.c @@ -211,6 +206,16 @@ # or curl) add_definitions(-DTHIRTY_TWO_BIT) + +if (NOT CMAKE_COMPILER_IS_GNUCXX OR + "${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") + # This uses a gcc extension + add_definitions( + -DOPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE + ) +endif() + + if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") set(OPENSSL_DEFINITIONS "${OPENSSL_DEFINITIONS};OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;NO_WINDOWS_BRAINDEATH") @@ -221,14 +226,12 @@ add_definitions( -DOPENSSL_RAND_SEED_OS # ${OPENSSL_SOURCES_DIR}/crypto/rand/rand_win.c - -DOPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE ) elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") # In order for "crypto/mem_sec.c" to compile on LSB add_definitions( -DOPENSSL_NO_SECURE_MEMORY - -DOPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE ) endif()