libcpr / cpr

C++ Requests: Curl for People, a spiritual port of Python Requests.
https://docs.libcpr.org/
Other
6.59k stars 937 forks source link

use curl's SMTP component with cpr installed #872

Closed christk1 closed 1 year ago

christk1 commented 1 year ago

I need to use this library with cmake on my project to make requests but I also need libcurl SMTP support inside my project. The SMTP is disabled in the curl installed with the cpr lib. Is there any workaround?

COM8 commented 1 year ago

How about using your system curl?

This is done by setting the CPR_USE_SYSTEM_CURL CMake variable to OFF (e.g. when configuring cmake .. -DCPR_USE_SYSTEM_CURL=OFF) Then cpr will use your system provided version of libcurl.

christk1 commented 1 year ago

created a merge request to make this simple. Please review, setting CPR_USE_SYSTEM_CURL=OFF is not working and i get the message that I don't have curl installed in my system. I can verify that it exists using curl --version | head -n 1 | awk '{ print $2 }'

COM8 commented 1 year ago

You need to have the curl dev packages installed for your distribution (e.g. curl-devel on fedora).