-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[sdl2-mixer] Fix usage #26083
[sdl2-mixer] Fix usage #26083
Conversation
I think this PR is invalid, this issue #26064 is not a vcpkg issue. I have tested sdl2-mixer in my side and the original usage works fine. |
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.
The PR is valid even if it doesn't fix #26064. Neither users nor heuristics can figure out
target_link_libraries($<IF:$<TARGET_EXISTS:SDL2_mixer::SDL2_mixer>,SDL2_mixer::SDL2_mixer,SDL2_mixer::SDL2_mixer-static>)
so it takes an explicit usage
file.
@@ -0,0 +1,3 @@ | |||
sdl2-mixer provides CMake targets: |
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.
For consistency, I would suggest to add a new line after this line.
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.
Yes. We should fix the auto-generated usage as well.
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.
Ah, I see, the # this is heuristically ...
was added only a short time ago.
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.
@dg0yt I created microsoft/vcpkg-tool#653 . The usage generation looks weird: We search in every CMake file in share
for add_library
and add the name(s) of the library to the list of exported targets. However, CMake just searches for <namespace>/target-name-config.cmake
and <namespace>/target-nameConfig.cmake
. I think we should adopt this.
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.
@Thomas1664 See #20190 for test port candidates and proposals for improvement (#20190 (comment)).
Just for reference the suggested output is
This is wrong because there aren't any sdl2-mixer libraries. |
Describe the pull request
What does your PR fix?
Related: [sdl2-mixer] CMake find_package is incomplete #26064