Skip to content

[sdl2-mixer] Fix pc file on *-windows-static #46828

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion ports/sdl2-mixer/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ vcpkg_cmake_config_fixup(
)
vcpkg_fixup_pkgconfig()

set(debug_libname "SDL2_mixerd")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/SDL2_mixer.pc" "-lSDL2_mixer" "-lSDL2_mixer-static")
set(debug_libname "SDL2_mixer-staticd")
endif()

if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/SDL2_mixer.pc" "-lSDL2_mixer" "-lSDL2_mixerd")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/SDL2_mixer.pc" "-lSDL2_mixer" "-l${debug_libname}")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
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.8.1",
"port-version": 1,
"port-version": 2,
"description": "Multi-channel audio mixer library for SDL.",
"homepage": "https://github.com/libsdl-org/SDL_mixer",
"license": "Zlib",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8658,7 +8658,7 @@
},
"sdl2-mixer": {
"baseline": "2.8.1",
"port-version": 1
"port-version": 2
},
"sdl2-mixer-ext": {
"baseline": "2.6.0",
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": "ee2053a681764a5fda41536fee42df58397d0c37",
"version": "2.8.1",
"port-version": 2
},
{
"git-tree": "0e4455e30cc3ef71f5da509ca3d6ced01f84a01e",
"version": "2.8.1",
Expand Down
Loading