-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I have a small problem: when I try to search for my self-built openssl, cmake always prefers the slproweb.com packages instead of my own ones (even when setting OPENSSL_ROOT_DIR). This is due to the different naming of the libraries in the slproweb installation: There, you'll find ssleay32MD.lib vs. ssleay32.lib in my location. I already opened a bug report for that: https://public.kitware.com/Bug/view.php?id=15887 I attached a patch both here and at the bug report which fixes this behaviour for the cost of having an additional and ugly option for the FindOpenSSL.cmake file. I don't see a different solution, as the no-MD/MT version of the library is the backup solution (although the one I would prefer in this case). If you have any other idea, please let me know. regards, Patrick -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (MingW32) iQIcBAEBAgAGBQJWdKmJAAoJEPAKI6QtGt1xB60QAIyVhBdjiqT/yRKE2GsCTj2o xdOKlyMJ8BozJB5KP34QndzVCpKEsC+rs8UStKjk7N0P5Qly3URuRTKG375wDXw1 3d1unxDfDUplTj/vCKjzKFD9lZxmACkJ9/9MHy7jhjWfYIxFUbxDMQvMWnzsSgSZ daC0lxG65ggUBpYtA32TeM9GP2zB8ebAd6gSoDN+Iz3bJrl5cWvb1fom1nh0+2XV fjGQ23yeraJGpzMF96siPXuk9XFoJvQfShIn2cBILjWHqr+NohlPayY6qQkFz4C5 Ock9aMwAYhhbVmJzFWho2A1+qFYGJq0fLnS1Qb/+uJg7GTtI8bC/PQynnbkt+q93 jP7UwlKzqFHUhlhkO7gmTZv8np3bxLUNYTblZvCED1iF4kdlzCwbeNfIqf5y4zev ndInmEqvsODZwshcOqRFbX1nxq93/ZVUAaNy9ESlOBiL6xB2qHl+WOq4vNjZdh7w Pav2UqiEpmyC/x8aFfafrkDDEY4pMf6J/s0U21M8QMXQXw/QErFF8pLGXszLFrqz vJc+M3j45AZ9TLu86Uwekt6Z9WAtfXtfvQGaVH5bSicz7UBopjW5oX+U+3VO83Sa 0vwSmDNbOIo7YVmjtMc4d1xJwYWsbAQ1tXnfUgk66LGZStOHzjYWhUAFoAXZGOCV S4jiUpisEtRhtJSOkNoG =nozd -----END PGP SIGNATURE-----
From 9fd1bfa174a8c8a5e63d875492ed01e7df34d1d7 Mon Sep 17 00:00:00 2001 From: Patrick Spendrin <[email protected]> Date: Sat, 19 Dec 2015 01:16:15 +0100 Subject: [PATCH] Make it possible to ignore slproweb OpenSSL slproweb binary installations are found by default and their file naming convention is preferred over the ones openssl generates by default (without MD/MT). This change makes it possible to only find libraries without MD/MT by setting OPENSSL_MSVC_NO_RT_MODE=TRUE --- Modules/FindOpenSSL.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 8b4b988..c78896b 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -38,6 +38,7 @@ # Set ``OPENSSL_ROOT_DIR`` to the root directory of an OpenSSL installation. # Set ``OPENSSL_USE_STATIC_LIBS`` to ``TRUE`` to look for static libraries. # Set ``OPENSSL_MSVC_STATIC_RT`` set ``TRUE`` to choose the MT version of the lib. +# Set ``OPENSSL_MSVC_NO_RT_MODE`` set ``TRUE`` to use libraries without MD / MT in their name. #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -108,7 +109,6 @@ find_path(OPENSSL_INCLUDE_DIR PATH_SUFFIXES include ) - if(WIN32 AND NOT CYGWIN) if(MSVC) # /MD and /MDd are the standard values - if someone wants to use @@ -127,10 +127,14 @@ if(WIN32 AND NOT CYGWIN) # ssleay32MD.lib is identical to ../ssleay32.lib # enable OPENSSL_USE_STATIC_LIBS to use the static libs located in lib/VC/static - if (OPENSSL_MSVC_STATIC_RT) - set(_OPENSSL_MSVC_RT_MODE "MT") + if (NOT OPENSSL_MSVC_NO_RT_MODE) + if (OPENSSL_MSVC_STATIC_RT) + set(_OPENSSL_MSVC_RT_MODE "MT") + else () + set(_OPENSSL_MSVC_RT_MODE "MD") + endif () else () - set(_OPENSSL_MSVC_RT_MODE "MD") + set(_OPENSSL_MSVC_RT_MODE "") endif () if(OPENSSL_USE_STATIC_LIBS) -- 2.6.3.windows.1
0001-Make-it-possible-to-ignore-slproweb-OpenSSL.patch.sig
Description: Binary data
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
