# HG changeset patch # User Sebastien Jodogne # Date 1607798490 -3600 # Node ID 781f53eee8561e15a6d55e65e7eef199b1fa4da3 # Parent 189e48f4a92abe7a3fa3c10faf20ad0bd50793af fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins diff -r 189e48f4a92a -r 781f53eee856 OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.0.2.cmake --- a/OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.0.2.cmake Thu Dec 10 18:36:57 2020 +0100 +++ b/OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.0.2.cmake Sat Dec 12 19:41:30 2020 +0100 @@ -124,7 +124,7 @@ # The following patch of "e_os2.h" prevents from building OpenSSL # as a DLL under Windows. Otherwise, symbols have inconsistent # linkage if ${OPENSSL_SOURCES} is used to create a DLL (notably - # if building an Orthanc plugin such as MySQL). + # if building an Orthanc plugin such as PostgreSQL or MySQL). file(WRITE ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2.h " #include \"e_os2_source.h\" #if defined(_WIN32) diff -r 189e48f4a92a -r 781f53eee856 OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake --- a/OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake Thu Dec 10 18:36:57 2020 +0100 +++ b/OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake Sat Dec 12 19:41:30 2020 +0100 @@ -55,6 +55,29 @@ if (Failure) message(FATAL_ERROR "Error while patching a file") endif() + + file(RENAME + ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2.h + ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2_source.h) + + # The following patch of "e_os2.h" prevents from building OpenSSL + # as a DLL under Windows. Otherwise, symbols have inconsistent + # linkage if ${OPENSSL_SOURCES} is used to create a DLL (notably + # if building an Orthanc plugin such as PostgreSQL or MySQL). + file(WRITE ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2.h " +#include \"e_os2_source.h\" +#if defined(_WIN32) +# undef OPENSSL_EXPORT +# undef OPENSSL_IMPORT +# undef OPENSSL_EXTERN +# undef OPENSSL_GLOBAL +# define OPENSSL_EXPORT +# define OPENSSL_IMPORT +# define OPENSSL_EXTERN extern +# define OPENSSL_GLOBAL +#endif +") + else() message("The patches for OpenSSL have already been applied") endif()