[Cmake-commits] CMake branch, next, updated. v3.3.2-1420-geb1640a

Brad King brad.king at kitware.com
Mon Oct 5 11:41:25 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  eb1640ad737262b7197d544c012e62bcdcc17f56 (commit)
       via  821e17785ecd4a329842dc6c5b093eb30cc4f160 (commit)
      from  558dbeb599340556d0d9cb629624e53feebc9a70 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb1640ad737262b7197d544c012e62bcdcc17f56
commit eb1640ad737262b7197d544c012e62bcdcc17f56
Merge: 558dbeb 821e177
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Oct 5 11:41:24 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 5 11:41:24 2015 -0400

    Merge topic 'FindOpenSSL-msvc-static-rt' into next
    
    821e1778 FindOpenSSL: Add support for static MSVC runtime


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=821e17785ecd4a329842dc6c5b093eb30cc4f160
commit 821e17785ecd4a329842dc6c5b093eb30cc4f160
Author:     Thijs Wenker <me at thoys.nl>
AuthorDate: Thu Oct 1 16:41:58 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 5 11:40:09 2015 -0400

    FindOpenSSL: Add support for static MSVC runtime
    
    Add an OPENSSL_MSVC_STATIC_RT option to switch from the default search
    for `/MD` libraries to look for `/MT` libraries instead.

diff --git a/Help/release/dev/FindOpenSSL-msvc-static-rt.rst b/Help/release/dev/FindOpenSSL-msvc-static-rt.rst
new file mode 100644
index 0000000..6e0ee27
--- /dev/null
+++ b/Help/release/dev/FindOpenSSL-msvc-static-rt.rst
@@ -0,0 +1,6 @@
+FindOpenSSL-msvc-static-rt
+--------------------------
+
+* The :module:`FindOpenSSL` module gained a new
+  ``OPENSSL_MSVC_STATIC_RT`` option to search for libraries using
+  the MSVC static runtime.
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index d75e8ab..a0f4c52 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -37,6 +37,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.
 
 #=============================================================================
 # Copyright 2006-2009 Kitware, Inc.
@@ -113,7 +114,7 @@ if(WIN32 AND NOT CYGWIN)
     # /MD and /MDd are the standard values - if someone wants to use
     # others, the libnames have to change here too
     # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
-    # TODO: handle /MT and static lib
+    # enable OPENSSL_MSVC_STATIC_RT to get the libs build /MT (Multithreaded no-DLL)
     # In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
     #   * MD for dynamic-release
     #   * MDd for dynamic-debug
@@ -126,6 +127,12 @@ 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")
+    else ()
+      set(_OPENSSL_MSVC_RT_MODE "MD")
+    endif ()
+
     if(OPENSSL_USE_STATIC_LIBS)
       set(_OPENSSL_PATH_SUFFIXES
         "lib"
@@ -142,7 +149,7 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(LIB_EAY_DEBUG
       NAMES
-        libeay32MDd
+        libeay32${_OPENSSL_MSVC_RT_MODE}d
         libeay32d
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
@@ -151,7 +158,7 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(LIB_EAY_RELEASE
       NAMES
-        libeay32MD
+        libeay32${_OPENSSL_MSVC_RT_MODE}
         libeay32
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
@@ -160,7 +167,7 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(SSL_EAY_DEBUG
       NAMES
-        ssleay32MDd
+        ssleay32${_OPENSSL_MSVC_RT_MODE}d
         ssleay32d
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
@@ -169,7 +176,7 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(SSL_EAY_RELEASE
       NAMES
-        ssleay32MD
+        ssleay32${_OPENSSL_MSVC_RT_MODE}
         ssleay32
         ssl
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}

-----------------------------------------------------------------------

Summary of changes:
 Help/release/dev/FindOpenSSL-msvc-static-rt.rst |    6 ++++++
 Modules/FindOpenSSL.cmake                       |   17 ++++++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)
 create mode 100644 Help/release/dev/FindOpenSSL-msvc-static-rt.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list