-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
Could NOT find CURL cmake error, when using a cmake package manager, and including curl already #790
Comments
I think the fact that it builds fine on macOS is because the developer tools include a curl headers + a curl library.
Maybe we should just install curl-dev with apt-get. |
That is probably the quickest fix. While I haven't worked with The other option would be to pass CMAKE_PREFIX_PATH into your |
Those are good tips, thanks for that.
Some build machines have a hard time, some others don’t, still a mystery but we’ll find a way I think.
… On Jan 20, 2023, at 12:39 AM, Mischan Toosarani-Hausberger ***@***.***> wrote:
Maybe we should just install curl-dev with apt-get.
That is probably the quickest fix.
While I haven't worked with cpm yet, I would imagine that one could either set result variables like FindCURL <https://cmake.org/cmake/help/latest/module/FindCURL.html> does from the cpm-package configuration to let other packages add libcurl as if it was found via find_package. We also query the CURL_FOUND result variable not to let find_package run again if libcurl was already configured.
The other option would be to pass CMAKE_PREFIX_PATH <https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html#variable:CMAKE_PREFIX_PATH> into your sentry-native package configuration, with whatever the libcurl cpm-package provides as its build output.
—
Reply to this email directly, view it on GitHub <#790 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6UJLW2XCAM4KB2NNJ53WTJFKXANCNFSM6AAAAAAT7OCAOI>.
You are receiving this because you authored the thread.
|
Setting CURL_FOUND to ON did the trick ! (Not sure how/whether this should be added to the doc) |
Description
Our C++ build system uses cpm (which is based on cmake FetchContent). We bring in curl that way (with cpm), and after that we include sentry with cpm (see in the repro steps). When doing so we get a
could not find curl
cmake error.This is a chicken and eggs problem, but maybe it could be solved. For some reason I didn't get it on my mac version which uses a more recent cmake.
When does the problem happen
Environment
Steps To Reproduce
then somewhere in your project, do `target_link_libraries(myproject sentry::sentry)
Log output
The text was updated successfully, but these errors were encountered: