-
Notifications
You must be signed in to change notification settings - Fork 7.5k
CMake can't link to libmpg123 when building with sdl2-mixer #22023
Description
I have 2 projects which are based on sdl2 which use sdl2-mixer and produce automatic builds for Windows. Since this issue #21776 this hasn't worked. A fix has been applied which makes sdl2-mixer build again with libmpg123 support, but my builds, which were working before, are still not working. I changed nothing.
Here is a link to the build: https://github.com/JoseTomasTocino/freegemas/runs/4520681620?check_suite_focus=true
I'm building on windows-latest in github actions. I'm getting the following error:
main.cpp
Generating Code...
LINK : fatal error LNK1104: cannot open file 'MPG123::libmpg123.lib' [D:\a\freegemas\freegemas\freegemas.vcxproj]
Error: Process completed with exit code 1.
This is my workflow:
Windows:
runs-on: windows-latest
steps:
- name: Install dependencies
run: |
vcpkg install --triplet x64-windows sdl2 sdl2-image[libjpeg-turbo] sdl2-ttf sdl2-mixer[libvorbis,mpg123] jsoncpp
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -D-DVCPKG_TARGET_TRIPLET=x64-windows -A x64 .
cmake --build . --config Release
The relevant part of my CMakeLists.txt can be found here: https://github.com/JoseTomasTocino/freegemas/blob/ea416c4594b3e0a97e594e4968d000f70ff198c6/CMakeLists.txt#L121-L152
There is probably an error in one of the cmake files shipped with sdl2-mixer, but I did not extensively troubleshoot this.