-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpr use system default curl? #1043
Comments
I do not really get your question there. What I understand is you want to use cpr with your system curl, but without setting |
I use And i cant use the download version, so |
Ah, then curl on your system is not properly configured to include the http and https components. How did you install libcurl on your system? |
Did you install |
yes, i do, i used centos stream 8 |
What I did: podman run -i -t quay.io/centos/centos:stream8 /bin/bash To get a docker container with centos8 stream. Then I build cpr and got the same error as you. git clone https://github.com/libcpr/cpr.git
cd cpr
mkdir build && cd build
dnf install -y gcc clang cmake gdb git libcurl-devel openssl-devel
cmake .. -DCMAKE_BUILD_TYPE=Release -DCPR_USE_SYSTEM_CURL=ON -DCPR_BUILD_TESTS=ON -DCPR_BUILD_TESTS_SSL=ON -DCPR_ENABLE_SSL=ON But this one can be fixed with the following patch: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5af3657..d41271c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -173,7 +173,7 @@ endif()
# Curl configuration
if(CPR_USE_SYSTEM_CURL)
if(CPR_ENABLE_SSL)
- find_package(CURL COMPONENTS HTTP HTTPS)
+ find_package(CURL)
if(CURL_FOUND)
message(STATUS "Curl ${CURL_VERSION_STRING} found on this system.")
# To be able to load certificates under Windows when using OpenSSL: This patch should work since I still had an too old version of curl installed (7.61.1). |
Just make sure |
Closing for no response. |
Is your feature request related to a problem?
i am trying to use cpr in centos stream 8, with default curl.
My system curl is 8.2.1.
but without component http and https.
If i dont turn on
CPR_USE_SYSTEM_CURL
, cpr seems will compile a curl version, which will mess up.Possible Solution
how can i set up cpr without install or complieing a new curl version?
The text was updated successfully, but these errors were encountered: