cpr icon indicating copy to clipboard operation
cpr copied to clipboard

Expose USE_NGHTTP2 as a CPR_VARIABLE

Open TheQue42 opened this issue 9 months ago • 1 comments

Is your feature request related to a problem?

We've just been troubleshooting a linking problem in our application, were some developers receive complaints on not finding "libnghttp2.so" (among others).

We tracked it down to the fact that some developer hosts had "libnghttp2-devel" installed, which made the cpr-local build of libcurl to include them in the build, which in turn resulted in not finding the .so's during linking.

Possible Solution

Since we dont need/want to use HTTP2, it would be nice to be able to disable the usage of things like this, via a suitable CPR_SKIP_NG_HTTP2, so that set(USE_NGHTTP2 OFF) is defined when building libcurl, similarly to CPR_ENABLE_CURL_HTTP_ONLY.

Alternatives

No response

Additional Context

No response

TheQue42 avatar Mar 21 '25 09:03 TheQue42

@TheQue42 thanks for reporting. Agree, this would be a good option to include. Would you like to create a PR for it?

Ref: https://github.com/curl/curl/blob/master/CMakeLists.txt#L1097

COM8 avatar Mar 22 '25 06:03 COM8