cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Improving OpenSSL search for APPLE platform

Open mayanksahu opened this issue 4 years ago • 2 comments

In MacOS BigSurr while compiling the repo we are not able to find OpenSSL (required version >= 1.0.0) On investigation, it was happening because of two cmake variables not being set properly: OPENSSL_INCLUDE_DIR, OPENSSL_LIBRARIES

when running pkg_search_module(OPENSSL openssl) to get info on openssl, we end up with

-- OPENSSL_INCLUDE_DIR = -- OPENSSL_LIBRARIES = ssl;crypto find_package(OpenSSL 1.0.0 REQUIRED), which is a fallback when pkg_search_module fails, is able to set the values properly.

-- OPENSSL_INCLUDE_DIR = /usr/local/opt/[email protected]/include -- OPENSSL_LIBRARIES = /usr/local/opt/[email protected]/lib/libssl.dylib;/usr/local/opt/[email protected]/lib/libcrypto.dylib So I'm making changes to strengthen the condition which makes us to go to fallback.

mayanksahu avatar May 17 '21 10:05 mayanksahu

I also had this problem, hope you pr helpful

mzygQAQ avatar May 17 '21 11:05 mzygQAQ

can we merge this?

mayanksahu avatar Jun 24 '23 03:06 mayanksahu