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

CMakeDeps should use the module file name to create Find<pkg>.cmake variables #10224

Closed
czoido opened this issue Dec 21, 2021 · 1 comment · Fixed by #10227
Closed

CMakeDeps should use the module file name to create Find<pkg>.cmake variables #10224

czoido opened this issue Dec 21, 2021 · 1 comment · Fixed by #10227
Milestone

Comments

@czoido
Copy link
Contributor

czoido commented Dec 21, 2021

CMakeDeps is creating some variables in module mode using the name of the package. Instead of that, using the file name is probably more expected. Now, for example, for libcurl, it would generate libcurl_FOUND and libcurl_VERSION. Probably CURL_FOUND and CURL_VERSION is a bit more expected (but not perfect). As commented in the linked discussion, it's impossible for Conan to address all the cases for the declared variables in the official CMake modules, but at least we can try to provide those.

Related to: conan-io/conan-center-index#8294 (comment)
and: conan-io/conan-center-index#8425 (comment)

@SpaceIm
Copy link
Contributor

SpaceIm commented Dec 21, 2021

What about <name>_LIBRARIES and <name>_INCLUDE_DIRS? They were available in cmake_find_package but I don't see these variables in Find files generated by CMakeDeps when cmake_find_mode is both.
It's important for proper emulation of official Find files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants