Go to file
Robert Edmonds e3395a7585 cmake: Fix ALSA "Unable to find..." warning
If cmake is invoked with -DSDL_ALSA=OFF, the misleading warning
message "Unable to find the alsa development library" is printed.
It's misleading because no attempt was actually made to find the ALSA
development library. It's always printed by the CheckALSA macro if
SDL_ALSA is false.

This commit moves this warning message in the CheckALSA macro to being
printed if ALSA_FOUND is false. However, I don't see an explicit warning
message like this for the other macros that search for development
libraries, so I wonder if the message shouldn't just be removed
entirely. It seems redundant with the "Could NOT find ALSA ..." message
generated by cmake.

Before this commit:

    $ cmake -B build -DSDL_ALSA=OFF
    [...]
    CMake Warning at cmake/sdlchecks.cmake:125 (message):
      Unable to find the alsa development library
    Call Stack (most recent call first):
      CMakeLists.txt:1530 (CheckALSA)
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: OFF): OFF
    [...]

    $ cmake -B build -DSDL_ALSA=ON
    [...]
    -- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: ON): OFF
    [...]

After this commit:

    $ cmake -B build -DSDL_ALSA=OFF
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: OFF): OFF
    [...]

    $ cmake -B build -DSDL_ALSA=ON
    [...]
    -- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
    CMake Warning at cmake/sdlchecks.cmake:123 (message):
      Unable to find the alsa development library
    Call Stack (most recent call first):
      CMakeLists.txt:1530 (CheckALSA)
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: ON): OFF
    [...]

All of the cmake invocations above were without the libasound2-dev
package installed.
2024-04-06 12:19:55 -04:00
.github ci: verify SDL build system does not include installed SDL headers 2024-04-01 18:38:47 +02:00
VisualC File dialog improvements 2024-04-04 22:07:14 -07:00
VisualC-GDK File dialog improvements 2024-04-04 22:07:14 -07:00
VisualC-WinRT File dialog improvements 2024-04-04 22:07:14 -07:00
Xcode File dialog improvements 2024-04-04 22:07:14 -07:00
android-project Updated to version 3.1.1 for the preview release 2024-04-01 17:03:46 -07:00
build-scripts wikiheaders.pl: Report a function's header file name. 2024-03-31 12:56:00 -04:00
cmake cmake: Fix ALSA "Unable to find..." warning 2024-04-06 12:19:55 -04:00
docs Removed SDL_RENDERER_ACCELERATED and SDL_RENDERER_SOFTWARE 2024-04-04 13:30:49 -07:00
include SDL_version.h: Fix some whitespace. 2024-04-06 02:09:48 -04:00
mingw/pkg-support mingw: add pkg-support files (INSTALL.txt and Makefile) 2024-03-23 21:41:20 +01:00
src File dialog improvements 2024-04-04 22:07:14 -07:00
test Removed SDL_RENDERER_ACCELERATED and SDL_RENDERER_SOFTWARE 2024-04-04 13:30:49 -07:00
wayland-protocols wayland: Add the xdg-foreign-unstable-v2 protocol 2024-03-15 18:30:05 -04:00
.clang-format Add 'wl_list_for_each_safe' to the clang-format macro list 2024-03-14 10:22:23 -04:00
.clang-tidy Fix size of memcpy in SDL_AudioDeviceFormatChangedAlreadyLocked 2023-08-05 14:14:45 -04:00
.editorconfig Fixed formatting for Haiku cc files 2023-01-25 03:03:41 -08:00
.gitignore GDK: Remove old shader sources, unify shader compilation .bats 2024-03-02 10:30:29 -08:00
.wikiheaders-options wikiheaders.pl: Report a function's header file name. 2024-03-31 12:56:00 -04:00
Android.mk Add time and realtime clock functions 2024-03-19 10:57:36 -07:00
BUGS.txt Cleaned up a few more Bugzilla mentions. 2021-02-12 14:46:49 -05:00
CMakeLists.txt File dialog improvements 2024-04-04 22:07:14 -07:00
CREDITS.md docs: Moved CREDITS and INSTALL to markdown format. 2023-11-29 12:31:27 -05:00
INSTALL.md docs: Moved CREDITS and INSTALL to markdown format. 2023-11-29 12:31:27 -05:00
LICENSE.txt Updated copyright for 2024 2024-01-01 13:15:26 -08:00
README-SDL.txt More HTTPS changes in the documentation. 2017-02-16 16:52:03 -05:00
README.md Tweaking documentation for the SDL 3.0 preview release 2024-03-24 06:16:02 -07:00
WhatsNew.txt Tweaking documentation for the SDL 3.0 preview release 2024-03-24 06:16:02 -07:00

README.md

Simple DirectMedia Layer (SDL) Version 3.0

https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting with README.md. If you are migrating to SDL 3.0 from SDL 2.0, the changes are extensively documented in README-migration.md.

Enjoy!

Sam Lantinga (slouken@libsdl.org)