mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
FindOpenSSL: Fix finding header files and static libraries on MinGW
* Avoid searching in the `Program Files` folder because the official OpenSSL is built for the MSVC ABI, and so is not compatible with MinGW. * Static libraries on MinGW has `.a` extension.
This commit is contained in:
committed by
Brad King
parent
eb2bdbd301
commit
248689f9bf
@@ -210,7 +210,7 @@ endif ()
|
||||
# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
if(OPENSSL_USE_STATIC_LIBS)
|
||||
set(_openssl_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
|
||||
@@ -230,7 +230,7 @@ else()
|
||||
set(_OPENSSL_FIND_PATH_SUFFIX "include")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (MSVC)
|
||||
# http://www.slproweb.com/products/Win32OpenSSL.html
|
||||
set(_OPENSSL_ROOT_HINTS
|
||||
${OPENSSL_ROOT_DIR}
|
||||
|
||||
Reference in New Issue
Block a user