add support for auto-linking SLpro or OpenSSL default build OpenSSL libs

This commit is contained in:
Günter Obiltschnig 2018-08-15 08:39:48 +02:00
parent e7fe8cfca3
commit e6b5288735
2 changed files with 29 additions and 11 deletions

View File

@ -26,6 +26,10 @@
#endif
#define POCO_EXTERNAL_OPENSSL_DEFAULT 1
#define POCO_EXTERNAL_OPENSSL_SLPRO 2
#include "Poco/Foundation.h"
#include <openssl/opensslv.h>
@ -114,6 +118,14 @@ enum RSAPaddingMode
#pragma comment(lib, "legacy_stdio_definitions.lib")
#pragma comment(lib, "legacy_stdio_wide_specifiers.lib")
#endif
#elif defined(POCO_EXTERNAL_OPENSSL)
#if POCO_EXTERNAL_OPENSSL == POCO_EXTERNAL_OPENSSL_SLPRO
#pragma comment(lib, "libeay32" POCO_LIB_SUFFIX)
#pragma comment(lib, "ssleay32" POCO_LIB_SUFFIX)
#elif POCO_EXTERNAL_OPENSSL == POCO_EXTERNAL_OPENSSL_DEFAULT
#pragma comment(lib, "libeay32.lib")
#pragma comment(lib, "ssleay32.lib")
#endif
#endif // POCO_INTERNAL_OPENSSL_MSVC_VER
#if !defined(Crypto_EXPORTS)
#pragma comment(lib, "PocoCrypto" POCO_LIB_SUFFIX)

View File

@ -170,23 +170,29 @@
// #define POCO_LOG_DEBUG
// OpenSSL on Windows
//
// OpenSSL options
//
// Poco has its own OpenSSL build system.
// See https://github.com/pocoproject/openssl/blob/master/README.md
// for details
// See <https://github.com/pocoproject/openssl/blob/master/README.md>
// for details.
//
// These options are Windows only.
// Disable the use of Poco OpenSSL binaries
// (external OpenSSL libraries must be provided).
// #define POCO_EXTERNAL_OPENSSL
//
// End OpenSSL options
// To disable the use of Poco-provided OpenSSL binaries,
// define POCO_EXTERNAL_OPENSSL.
//
// Possible values:
// POCO_EXTERNAL_OPENSSL_SLPRO:
// Automatically link OpenSSL libraries from OpenSSL Windows installer provided
// by Shining Light Productions <http://slproweb.com/products/Win32OpenSSL.html>
// The (global) library search path must be set accordingly.
// POCO_EXTERNAL_OPENSSL_DEFAULT:
// Automatically link OpenSSL libraries from standard OpenSSL Windows build.
// The (global) library search path must be set accordingly.
// empty or other value:
// Do not link any OpenSSL libraries automatically. You will have to edit the
// Visual C++ project files for Crypto and NetSSL_OpenSSL.
#define POCO_EXTERNAL_OPENSSL POCO_EXTERNAL_OPENSSL_SLPRO
// Define to prevent changing the suffix for shared libraries