Improve cmake build to find openssl and fix windows build (#2120)

* Improve cmake build. Use cmake to find openssl and set proper dependencies to internal openssl.
This commit is contained in:
Joerg-Christian Boehme
2018-03-11 22:17:21 +01:00
committed by GitHub
parent 837fa82549
commit d90dca6865
8 changed files with 92 additions and 80 deletions

View File

@@ -56,6 +56,37 @@
//
#if defined(_MSC_VER)
#if !defined(POCO_NO_AUTOMATIC_LIBS)
#if defined(POCO_INTERNAL_OPENSSL_MSVC_VER)
#if defined(POCO_EXTERNAL_OPENSSL)
#pragma warning "External OpenSSL defined but internal headers used - possible mismatch!"
#endif // POCO_EXTERNAL_OPENSSL
#if !defined(_DEBUG)
#define POCO_DEBUG_SUFFIX ""
#if !defined (_DLL)
#define POCO_STATIC_SUFFIX "mt"
#else // _DLL
#define POCO_STATIC_SUFFIX ""
#endif
#else // _DEBUG
#define POCO_DEBUG_SUFFIX "d"
#if !defined (_DLL)
#define POCO_STATIC_SUFFIX "mt"
#else // _DLL
#define POCO_STATIC_SUFFIX ""
#endif
#endif
#pragma comment(lib, "libcrypto" POCO_STATIC_SUFFIX POCO_DEBUG_SUFFIX ".lib")
#pragma comment(lib, "libssl" POCO_STATIC_SUFFIX POCO_DEBUG_SUFFIX ".lib")
#if !defined(_WIN64) && !defined (_DLL) && \
(POCO_INTERNAL_OPENSSL_MSVC_VER == 120) && \
(POCO_MSVC_VERSION < POCO_INTERNAL_OPENSSL_MSVC_VER)
#pragma comment(lib, "libPreVS2013CRT" POCO_STATIC_SUFFIX POCO_DEBUG_SUFFIX ".lib")
#endif
#if !defined (_DLL) && (POCO_MSVS_VERSION >= 2015)
#pragma comment(lib, "legacy_stdio_definitions.lib")
#pragma comment(lib, "legacy_stdio_wide_specifiers.lib")
#endif
#endif // POCO_INTERNAL_OPENSSL_MSVC_VER
#if !defined(NetSSL_EXPORTS)
#pragma comment(lib, "PocoNetSSL" POCO_LIB_SUFFIX)
#endif