8000 Finalize detection of NuGet installed OpenSSL · lethalbrains/arangodb@e398ac6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e398ac6

Browse files
committed
Finalize detection of NuGet installed OpenSSL
1 parent 8e23b46 commit e398ac6

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

3rdParty/OpenSSL/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ set(OPENSSL_INCLUDE_DIR
3535
"OpenSSL: Include Directory"
3636
)
3737

38-
if (WIN32)
38+
if (WIN32 AND NOT SSL_NUGET)
3939
if (DEBUG)
4040
set(OPENSSL_EXT "d")
4141
else ()

cmake/FindOpenSSL.cmake

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ endif()
7171

7272
if (WIN32)
7373
if (IS_DIRECTORY "${OPENSSL_ROOT_DIR}/build/native/")
74-
set(NUGET TRUE)
74+
set(SSL_NUGET TRUE)
7575
else()
76-
set(NUGET FALSE)
76+
set(SSL_NUGET FALSE)
7777
endif()
78-
if (OPENSSL_ROOT_DIR AND NUGET)
78+
if (OPENSSL_ROOT_DIR AND SSL_NUGET)
7979
message("Found nuGET installation of OpenSSL!")
8080
set(SSL_BITS "x64")
8181
# its an openssl downloaded via nuget!
@@ -130,28 +130,23 @@ find_path(OPENSSL_INCLUDE_DIR
130130
)
131131

132132
if(WIN32 AND NOT CYGWIN)
133-
if (NUGET)
133+
if (SSL_NUGET)
134134
# /MD and /MDd are the standard values - if someone wants to use
135135
# others, the libnames have to change here too
136136
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
137137
# enable OPENSSL_MSVC_STATIC_RT to get the libs build /MT (Multithreaded no-DLL)
138-
# In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
139-
# * MD for dynamic-release
140-
# * MDd for dynamic-debug
141-
# * MT for static-release
142-
# * MTd for static-debug
143138

144139
# Implementation details:
145140
# We are using the libraries located in the VC subdir instead of the parent directory eventhough :
146141
# libeay32MD.lib is identical to ../libeay32.lib, and
147142
# ssleay32MD.lib is identical to ../ssleay32.lib
148143
# enable OPENSSL_USE_STATIC_LIBS to use the static libs located in lib/VC/static
149144

150-
if (OPENSSL_MSVC_STATIC_RT)
151-
set(_OPENSSL_MSVC_RT_MODE "MT")
152-
else ()
153-
set(_OPENSSL_MSVC_RT_MODE "MD")
154-
endif ()
145+
#if (OPENSSL_MSVC_STATIC_RT)
146+
# set(_OPENSSL_MSVC_RT_MODE "MT")
147+
#else ()
148+
# set(_OPENSSL_MSVC_RT_MODE "MD")
149+
#endif ()
155150

156151
set(LIB_EAY_DEBUG LIB_EAY_DEBUG-NOTFOUND)
157152
if (EXISTS "${OPENSSL_LIB_DIR}/debug/libeay32.lib")
@@ -187,6 +182,7 @@ if(WIN32 AND NOT CYGWIN)
187182
set(OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} )
188183
set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} )
189184
set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
185+
190186
elseif(MSVC)
191187
# /MD and /MDd are the standard values - if someone wants to use
192188
# others, the libnames have to change here too
@@ -451,7 +447,6 @@ else ()
451447
endif ()
452448

453449
mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
454-
455450
if(OPENSSL_FOUND)
456451
if(NOT TARGET OpenSSL::Crypto AND
457452
(EXISTS "${OPENSSL_CRYPTO_LIBRARY}" OR

0 commit comments

Comments
 (0)
0