Skip to content
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

libcurl: Improve CMake support #26063

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AbrilRBS
Copy link
Member

@AbrilRBS AbrilRBS commented Nov 28, 2024

Summary

Changes to recipe: libcurl/[*]

Motivation

This PR started as a fix for the linked issue, but evolved to remove all the patching necessary when CMakeDeps was not as powerful as it is today.

Details

Closes #26054

@AbrilRBS AbrilRBS self-assigned this Nov 28, 2024
@@ -596,7 +545,14 @@ def _generate_with_cmake(self):
tc.variables["CURL_ZLIB"] = self.options.with_zlib
tc.variables["CURL_BROTLI"] = self.options.with_brotli
tc.variables["CURL_ZSTD"] = self.options.with_zstd
if self.options.with_zstd:
# Can't force CMakeDeps to generate this
tc.cache_variables["ZSTD_FOUND"] = True
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main stopping point for this PR. Ideally we would have a way that CMakeDeps listens to the set_properties for these versions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussion in conan-io/conan#17483

@@ -668,17 +639,12 @@ def package_info(self):
self.cpp_info.components["curl"].libs = ["libcurl_imp"] if self.options.shared else ["libcurl"]
else:
self.cpp_info.components["curl"].libs = ["curl"]
if self.settings.os in ["Linux", "FreeBSD"]:
if self.options.with_libidn:
self.cpp_info.components["curl"].libs.append("idn")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idn library is generated for this option, it's just a library used as a dependency, my geuss is that this never worked, but I have to double check where this comes from before merging

@@ -583,6 +516,8 @@ def _generate_with_cmake(self):
tc = CMakeToolchain(self)
tc.variables["ENABLE_UNICODE"] = True
tc.variables["BUILD_TESTING"] = False
tc.cache_variables["BUILD_LIBCURL_DOCS"] = False
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should listen to the with_docs option

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.

[package] libcurl/8.10.1: with_nghttp2 build incorrect on Windows
1 participant