File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,15 @@ function(cpprest_find_openssl)
41
41
# This should prevent linking against the system provided 0.9.8y
42
42
set (_OPENSSL_VERSION "" )
43
43
endif ()
44
- find_package (OpenSSL 1.0.0 REQUIRED )
44
+ if (UNIX )
45
+ find_package (PkgConfig )
46
+ pkg_search_module (OPENSSL openssl )
47
+ endif ()
48
+ if (OPENSSL_FOUND )
49
+ target_link_libraries (cpprest PRIVATE ${OPENSSL_LDFLAGS} )
50
+ else ()
51
+ find_package (OpenSSL 1.0.0 REQUIRED )
52
+ endif ()
45
53
46
54
INCLUDE (CheckCXXSourceCompiles )
47
55
set (CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR} " )
@@ -67,4 +75,4 @@ function(cpprest_find_openssl)
67
75
# libressl doesn't ship with the cleanup method being used in ws_client_wspp
68
76
target_compile_definitions (cpprestsdk_openssl_internal INTERFACE -DCPPREST_NO_SSL_LEAK_SUPPRESS )
69
77
endif ()
70
- endfunction ()
78
+ endfunction ()
You can’t perform that action at this time.
0 commit comments