Skip to content

feat(cmake): expose CPR_CURL_USE_NGHTTP2 option for built-in curl - #1334

Merged
COM8 merged 1 commit into
libcpr:masterfrom
officialjisanhalder-art:feat/expose-curl-nghttp2-option
Oct 18, 2026
Merged

COM8 merged 1 commit into
libcpr:masterfrom
officialjisanhalder-art:feat/expose-curl-nghttp2-option

Conversation

@officialjisanhalder-art

@officialjisanhalder-art officialjisanhalder-art commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When using the bundled libcurl dependency, consumers had no direct CMake option to configure HTTP/2 support (
ghttp2).

Changes

  • Added CPR_CURL_USE_NGHTTP2 CMake option in CMakeLists.txt and forwarded it to libcurl's build configuration.

Testing

  • Verified CMake option declaration and forwarding logic.

Fixes #1202

Adds `CPR_CURL_USE_NGHTTP2` CMake option (default ON) allowing users to disable HTTP/2 support (via nghttp2) in the bundled libcurl build by setting `USE_NGHTTP2 OFF`.

Fixes libcpr#1202.

*Authored and verified with [ByteAsk](https://byteask.com).*
@COM8 COM8 added this to the CPR 1.16.0 milestone Oct 18, 2026
@COM8
COM8 merged commit cdbbd90 into libcpr:master Oct 18, 2026
45 checks passed
@COM8

COM8 commented Oct 18, 2026

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose USE_NGHTTP2 as a CPR_VARIABLE

2 participants