libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
433 stars 146 forks source link

CMake support for libxmp? #426

Closed slouken closed 2 years ago

slouken commented 2 years ago

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?

sezero commented 2 years ago

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:

slouken commented 2 years ago

I'm fine with either solution.

sezero commented 2 years ago

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.

slouken commented 2 years ago

Actually we can't use master directly because we need Android.mk. Maybe we branch the current master as pre4.5.1-SDL?

sezero commented 2 years ago

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 :)

slouken commented 2 years ago

Sure, go for it.

sezero commented 2 years ago

Pushed initial work, hopefully correct and works.

sezero commented 2 years ago

@madebr: If there are cmake glitches in there let us know so that we can fix in mainstream too.

sezero commented 2 years ago

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

sezero commented 2 years ago

Pushed initial work, hopefully correct and works.

@slouken: your xcode project file needs updating after the 4.5.1 switch:

sezero commented 2 years ago

@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

slouken commented 2 years ago

Done!

madebr commented 2 years ago

CMake support has been added in https://github.com/libsdl-org/SDL_mixer/commit/9ad5eb2c35b72e6a69e381e94471ddbfb2ad8a6c Is something else missing?

fjtrujy commented 2 years ago

I think that this issue has been solved