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
Toolchain declare DIR find package variables #9032
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,14 @@ def is_multi_configuration(generator): | |
if not generator: | ||
return False | ||
return "Visual" in generator or "Xcode" in generator or "Multi-Config" in generator | ||
|
||
|
||
def get_file_name(conanfile): | ||
"""Get the name of the file for the find_package(XXX)""" | ||
# This is used by the CMakeToolchain to adjust the XXX_DIR variables and the CMakeDeps. Both | ||
# to know the file name that will have the XXX-config.cmake files. | ||
ret = conanfile.new_cpp_info.get_property("cmake_file_name", "CMakeDeps") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not very great now, that it depends explicitly on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is used in both of them. Maybe that property shouldn't be attached to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a comment. Suggestion welcome. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not fully convinced on the proposition of both having the property name and the specific generator as a specialization. We might want to revisit that, but yes, I guess at the moment this is fine here. |
||
if not ret: | ||
ret = conanfile.cpp_info.get_filename("cmake_find_package_multi", default_name=False) | ||
return ret or conanfile.ref.name | ||
|
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 doesn't happen in OSX, right, only for these systems?