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-mixer] Fix link mpg123 error #22049

Merged
merged 2 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ports/sdl2-mixer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ set(SDL_MIXER_DEFINES MUSIC_WAV)

# MP3 support
if(SDL_MIXER_ENABLE_MP3)
find_package(mpg123 CONFIG REQUIRED)
set(MPG123_LIBRARY MPG123::libmpg123)
find_path(MPG123_INCLUDE_DIR mpg123.h)
find_library(MPG123_LIBRARY NAMES libmpg123 mpg123)
list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR})
list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123)
list(APPEND SDL_MIXER_LIBRARIES ${MPG123_LIBRARY})
if (SDL_DYNAMIC_LOAD)
Expand All @@ -24,8 +25,9 @@ endif()

# FLAC support
if(SDL_MIXER_ENABLE_FLAC)
find_package(flac CONFIG REQUIRED)
set(FLAC_LIBRARY FLAC::FLAC)
find_path(FLAC_INCLUDE_DIR FLAC/all.h)
find_library(FLAC_LIBRARY FLAC)
list(APPEND SDL_MIXER_INCLUDES ${FLAC_INCLUDE_DIR})
list(APPEND SDL_MIXER_DEFINES MUSIC_FLAC)
list(APPEND SDL_MIXER_LIBRARIES ${FLAC_LIBRARY})
if (SDL_DYNAMIC_LOAD)
Expand Down
2 changes: 1 addition & 1 deletion ports/sdl2-mixer/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sdl2-mixer",
"version": "2.0.4",
"port-version": 15,
"port-version": 16,
"description": "Multi-channel audio mixer library for SDL.",
"homepage": "https://www.libsdl.org/projects/SDL_mixer",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6214,7 +6214,7 @@
},
"sdl2-mixer": {
"baseline": "2.0.4",
"port-version": 15
"port-version": 16
},
"sdl2-net": {
"baseline": "2.0.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/sdl2-mixer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "23eb6562f5153eb39a84eb2673d5dc9bd2ce78aa",
"version": "2.0.4",
"port-version": 16
},
{
"git-tree": "981b981d938287223eb7ebbe365cfbb371ba71ef",
"version": "2.0.4",
Expand Down