-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
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