Skip to content

Commit 7a07693

Browse files
AbrilRBSErniGH
andauthored
libcurl: Fix http2 detection in CMake builds (conan-io#26742)
--------- Co-authored-by: Ernesto de Gracia Herranz <[email protected]>
1 parent a6ac366 commit 7a07693

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

recipes/libcurl/all/conanfile.py

+1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ def _patch_cmake(self):
381381
replace_in_file(self, cmakelists, "find_package(NGHTTP2 REQUIRED)", "find_package(libnghttp2 REQUIRED CONFIG)")
382382
else:
383383
replace_in_file(self, cmakelists, "find_package(NGHTTP2)", "find_package(libnghttp2 REQUIRED CONFIG)")
384+
replace_in_file(self, cmakelists, "NGHTTP2_FOUND", "libnghttp2_FOUND")
384385
replace_in_file(self, cmakelists, "${NGHTTP2_INCLUDE_DIRS}", "${libnghttp2_INCLUDE_DIRS}")
385386
replace_in_file(self, cmakelists, "${NGHTTP2_LIBRARIES}", "libnghttp2::nghttp2")
386387

recipes/libcurl/all/test_package/test_package.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ int main(void)
66
CURL *curl;
77
int retval = 0;
88
const char *const *proto;
9+
const char *const *feat;
910
curl_version_info_data* id = curl_version_info(CURLVERSION_NOW);
1011
if (!id)
1112
return 1;
@@ -14,7 +15,12 @@ int main(void)
1415
for(proto = id->protocols; *proto; proto++) {
1516
printf("%s ", *proto);
1617
}
17-
printf("\nversion: %s\nssl version: %s\nfeatures: %d\n", id->version, id->ssl_version, id->features);
18+
printf("\nversion: %s\nssl version: %s\n", id->version, id->ssl_version);
19+
20+
printf("features: ");
21+
for(feat = id->feature_names; *feat; feat++) {
22+
printf("%s ", *feat);
23+
}
1824

1925
curl = curl_easy_init();
2026
if(curl) {

0 commit comments

Comments
 (0)