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

Simplify the CMake scripts, fix warnings and add ci #9

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

madebr
Copy link

@madebr madebr commented Dec 20, 2024

We (=SDL maintainers) received a pr today adding stsound support to SDL_mixer in libsdl-org/SDL_mixer#650

When looking at the StSound CMake scripts, we found it was very specific to Visual Studio 2017.
CMake is supposed to be usable for almost all targets today, so I made it readily usable on all platforms.

  • The first commit simplifies the CMake script, and also adds support for installation and testing
  • The second commit fixes a cast warning I noticed when building with mingw64
  • The third commit hides the MSVC-specific #pragma comment(lib,"winmm.lib") from non-msvc toolchains
  • The fourth commit fixes -Wunused-parameter warnings
  • The fifth commit adds GitHub ci support. The result looks like this. MSVC currently fails because of precision loss and/or signed/unsigned mismatches. Those can probably be fixed by using explicit casts. But I did not fix those because I felt it was better for you to have a look at these.

MSVC-specific, Windows-specific, and/or taste-specific configuration
options belong in a CMake toolchain, or in build scripts maintained
by the user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant