SDL_mixer
SDL_mixer copied to clipboard
CMake support for libxmp?
The current CI fails because libxmp is missing vendored library CMake support: https://github.com/libsdl-org/SDL_mixer/runs/7365768492?check_suite_focus=true
Maybe we don't need it? It's provided for Visual Studio in VisualC/external
What's the best way to fix this?
Current libmp development tree has full support for cmake, we hope to make a 4.5.1 release soon (we hope..) IMO, there are two options:
- backport it to 4.5.0-SDL branch
- change SDL_mixer to use the current git master (which is super stable) until libxmp-4.5.1 is released.
I'm fine with either solution.
I'm fine with either solution.
Then I suggest the second solution: Since the libxmp switch is in SDL_mixer development branch, a libxmp-4.5.1 release should happen long before a new SDL_mixer release.
Actually we can't use master directly because we need Android.mk. Maybe we branch the current master as pre4.5.1-SDL?
Actually we can't use master directly because we need Android.mk. Maybe we branch the current master as pre4.5.1-SDL?
That was what I meant :)
Sure, go for it.
Pushed initial work, hopefully correct and works.
@madebr: If there are cmake glitches in there let us know so that we can fix in mainstream too.
MSVC vendored libxmp build is failing because libxmp-vendored support isn't there: https://github.com/libsdl-org/SDL_mixer/blob/main/CMakeLists.txt#L585
Leaving things to @madebr
Pushed initial work, hopefully correct and works.
@slouken: your xcode project file needs updating after the 4.5.1 switch:
-
../../external/libxmp/src/filetype.c
needs adding to sources. -
HAVE_ROUND
define no longer needed. -
HAVE_LIBM
define is not needed. -
LIBXMP_NO_DEPACKERS
andLIBXMP_NO_PROWIZARD
defines are no longer needed: they are implied byLIBXMP_CORE_PLAYER
. -
"\"$(SRCROOT)/../../external/libxmp/src\""
and"\"$(SRCROOT)/../../external/libxmp/src/loaders\""
in HEADER_SEARCH_PATHS no longer needed: libxmp sources now use relative paths in include directives.
@slouken: your xcode project file needs updating after the 4.5.1 switch:
In addition, since you are building a dylib, do define XMP_SYM_VISIBILITY
and build with -fvisibility=hidden
Done!
CMake support has been added in https://github.com/libsdl-org/SDL_mixer/commit/9ad5eb2c35b72e6a69e381e94471ddbfb2ad8a6c Is something else missing?
I think that this issue has been solved