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

[bug] Wrong parameter name used in find_library() function in cmakedeps_macros.cmake #9931

Closed
akleber opened this issue Nov 3, 2021 · 0 comments · Fixed by #9932
Closed
Milestone

Comments

@akleber
Copy link
Contributor

akleber commented Nov 3, 2021

When using the cmake function find_library() it accepts a parameter named "NAMES" but in cmakedeps_macro.cmake, generated by conan/tools/cmake/cmakedeps/templates/macros.py , the parameter name "NAME" is used by mistake.
See also: https://cmake.org/cmake/help/latest/command/find_library.html

As the NAMES parameter name is kind of optional, it currently works as it is but the find_library() function not only searches for the actual library by its name, but it also looks for a library called NAME.
This can bee seen, when cmake is run with the --debug-find argument.

I will provide a pull request for the fix.

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.

2 participants