Mercurial > hg > orthanc
comparison OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake @ 4368:781f53eee856
fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 12 Dec 2020 19:41:30 +0100 |
parents | 304842a0d152 |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4367:189e48f4a92a | 4368:781f53eee856 |
---|---|
53 ) | 53 ) |
54 | 54 |
55 if (Failure) | 55 if (Failure) |
56 message(FATAL_ERROR "Error while patching a file") | 56 message(FATAL_ERROR "Error while patching a file") |
57 endif() | 57 endif() |
58 | |
59 file(RENAME | |
60 ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2.h | |
61 ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2_source.h) | |
62 | |
63 # The following patch of "e_os2.h" prevents from building OpenSSL | |
64 # as a DLL under Windows. Otherwise, symbols have inconsistent | |
65 # linkage if ${OPENSSL_SOURCES} is used to create a DLL (notably | |
66 # if building an Orthanc plugin such as PostgreSQL or MySQL). | |
67 file(WRITE ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2.h " | |
68 #include \"e_os2_source.h\" | |
69 #if defined(_WIN32) | |
70 # undef OPENSSL_EXPORT | |
71 # undef OPENSSL_IMPORT | |
72 # undef OPENSSL_EXTERN | |
73 # undef OPENSSL_GLOBAL | |
74 # define OPENSSL_EXPORT | |
75 # define OPENSSL_IMPORT | |
76 # define OPENSSL_EXTERN extern | |
77 # define OPENSSL_GLOBAL | |
78 #endif | |
79 ") | |
80 | |
58 else() | 81 else() |
59 message("The patches for OpenSSL have already been applied") | 82 message("The patches for OpenSSL have already been applied") |
60 endif() | 83 endif() |
61 | 84 |
62 add_definitions( | 85 add_definitions( |