[Cmake-commits] CMake branch, next, updated. v3.6.1-1616-gf7e7afe

Brad King brad.king at kitware.com
Tue Aug 30 10:52:12 EDT 2016


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  f7e7afe9d54fac4527c70e0b8a9c463aae3cc4de (commit)
       via  ed1758f8eb58a4e52acf0f3885f82403814f5ffd (commit)
      from  9c041eab42520c99c753b9e5be3c52943a834e21 (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=f7e7afe9d54fac4527c70e0b8a9c463aae3cc4de
commit f7e7afe9d54fac4527c70e0b8a9c463aae3cc4de
Merge: 9c041ea ed1758f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 30 10:52:10 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 30 10:52:10 2016 -0400

    Merge topic 'FindOpenSSL-new-windows-names' into next
    
    ed1758f8 FindOpenSSL: Fix detection of OpenSSL 1.1 Win32/64


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed1758f8eb58a4e52acf0f3885f82403814f5ffd
commit ed1758f8eb58a4e52acf0f3885f82403814f5ffd
Author:     Alexis Murzeau <amubtdx at outlook.fr>
AuthorDate: Mon Aug 29 20:57:32 2016 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 30 10:51:25 2016 -0400

    FindOpenSSL: Fix detection of OpenSSL 1.1 Win32/64
    
    Since OpenSSL 1.1.0, Windows binaries are libcrypto and libssl instead of
    the old names libeay32 and ssleay32.
    When using MSVC, FindOpenSSL was searching for the old lib names only so
    this add the new names to be able to find OpenSSL 1.1.0 libraries.
    
    For example, the files in lib directory of OpenSSL 1.1.0 Win64 :
     - libcrypto.lib
     - libssl.lib
     - VC/libcrypto64MD.lib
     - VC/libcrypto64MDd.lib
     - VC/libcrypto64MT.lib
     - VC/libcrypto64MTd.lib
     - VC/libssl64MD.lib
     - VC/libssl64MDd.lib
     - VC/libssl64MT.lib
     - VC/libssl64MTd.lib
    
    32 bits OpenSSL has the same files with "32" instead of "64" for files in
    VC directory.
    
    MinGW still works and use lib/libcrypto.lib and lib/libssl.lib.
    
    This patch also add libssl and libcrypto for other windows compilers too (like
    Intel).

diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 10b62ff..7ddd783 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -133,6 +133,13 @@ if(WIN32 AND NOT CYGWIN)
       set(_OPENSSL_MSVC_RT_MODE "MD")
     endif ()
 
+    # Since OpenSSL 1.1, lib names are like libcrypto32MTd.lib and libssl32MTd.lib
+    if( "${CMAKE_SIZEOF_VOID_P}" STREQUAL "8" )
+        set(_OPENSSL_MSVC_ARCH_SUFFIX "64")
+    else()
+        set(_OPENSSL_MSVC_ARCH_SUFFIX "32")
+    endif()
+
     if(OPENSSL_USE_STATIC_LIBS)
       set(_OPENSSL_PATH_SUFFIXES
         "lib"
@@ -149,6 +156,8 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(LIB_EAY_DEBUG
       NAMES
+        libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+        libcryptod
         libeay32${_OPENSSL_MSVC_RT_MODE}d
         libeay32d
       NAMES_PER_DIR
@@ -159,6 +168,8 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(LIB_EAY_RELEASE
       NAMES
+        libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+        libcrypto
         libeay32${_OPENSSL_MSVC_RT_MODE}
         libeay32
       NAMES_PER_DIR
@@ -169,6 +180,8 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(SSL_EAY_DEBUG
       NAMES
+        libssl${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+        libssld
         ssleay32${_OPENSSL_MSVC_RT_MODE}d
         ssleay32d
       NAMES_PER_DIR
@@ -179,6 +192,8 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(SSL_EAY_RELEASE
       NAMES
+        libssl${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+        libssl
         ssleay32${_OPENSSL_MSVC_RT_MODE}
         ssleay32
         ssl
@@ -236,6 +251,7 @@ if(WIN32 AND NOT CYGWIN)
     # Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues:
     find_library(LIB_EAY
       NAMES
+        libcrypto
         libeay32
       NAMES_PER_DIR
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
@@ -247,6 +263,7 @@ if(WIN32 AND NOT CYGWIN)
 
     find_library(SSL_EAY
       NAMES
+        libssl
         ssleay32
       NAMES_PER_DIR
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}

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

Summary of changes:
 Modules/FindOpenSSL.cmake |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list