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

[sdl2] Fix could not find found library alsa #42964

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WangWeiLin-MV
Copy link
Contributor

Fix #42929, error with Could NOT find ALSA (missing: ALSA_LIBRARY) (found version "1.2.13")

Remove set(CMAKE_REQUIRE_FIND_PACKAGE_ALSA 1).

Checklist

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

Test

The installation vcpkg install sdl2[alsa] imgui[sdl2-binding,sdl2-renderer-binding] tests pass with the following triplets:

  • x64-linux

@WangWeiLin-MV WangWeiLin-MV added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Dec 27, 2024
@WangWeiLin-MV
Copy link
Contributor Author

WangWeiLin-MV commented Dec 27, 2024

@dg0yt #39709

This error seems from set(CMAKE_REQUIRE_FIND_PACKAGE_ALSA 1) with ports/alsa/vcpkg-cmake-wrapper.cmake.


set(SDL_ALSA @SDL_ALSA@)
set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@)
-if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static)
+if(SDL_ALSA)
+ set(CMAKE_REQUIRE_FIND_PACKAGE_ALSA 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make sense. If the user asks for alsa, and the dependency alsa is installed, then CMAKE_REQUIRE_FIND_PACKAGE_ALSA doesn't cause an error, but it catches errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[imgui,sdl2,alsa] Build error on x64-linux
3 participants