Skip to content

Commit ec6df5b

Browse files
committed
Revert "libcpprestsdk: fix building as a static library (microsoft#1344)"
This reverts commit cb7ca74. Issues concerning OpenSSL linking dependency (microsoft#1384, microsoft#1388) and cross compiling (microsoft#1378) have been reported. - Fixes microsoft#1384, microsoft#1388
1 parent 18212a2 commit ec6df5b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Release/cmake/cpprest_find_openssl.cmake

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,7 @@ function(cpprest_find_openssl)
4343
message(STATUS "OPENSSL_ROOT_DIR = ${OPENSSL_ROOT_DIR}")
4444
set(_OPENSSL_VERSION "")
4545
endif()
46-
if(UNIX)
47-
find_package(PkgConfig)
48-
pkg_search_module(OPENSSL openssl)
49-
endif()
50-
if(OPENSSL_FOUND)
51-
target_link_libraries(cpprest PRIVATE ${OPENSSL_LDFLAGS})
52-
else()
53-
find_package(OpenSSL 1.0.0 REQUIRED)
54-
endif()
46+
find_package(OpenSSL 1.0.0 REQUIRED)
5547

5648
INCLUDE(CheckCXXSourceCompiles)
5749
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
@@ -77,4 +69,4 @@ function(cpprest_find_openssl)
7769
# libressl doesn't ship with the cleanup method being used in ws_client_wspp
7870
target_compile_definitions(cpprestsdk_openssl_internal INTERFACE -DCPPREST_NO_SSL_LEAK_SUPPRESS)
7971
endif()
80-
endfunction()
72+
endfunction()

0 commit comments

Comments
 (0)