SDL/cmake
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
..
android cmake: create Android jars + apks for tests 2023-07-20 16:54:29 +02:00
test cmake: build tests against installed SDL prefix 2024-03-23 21:41:20 +01:00
3rdparty.cmake cmake: fix typo in cmake/sdlplatform.cmake 2024-04-02 23:44:15 +02:00
CPackProjectConfig.cmake.in cmake: add CPack support for creating binary archives 2023-01-31 01:59:21 +01:00
CheckCPUArchitecture.cmake cmake+video: always use altivec.h header for detection + introduce SDL_ENABLE_ALTIVEC 2023-03-15 14:54:20 +01:00
FindFFmpeg.cmake cmake: use *_STATIC_* variables when linking to a static ffmpeg 2023-10-10 03:32:46 -07:00
FindLibUSB.cmake cmake: find libusb through LibUSB cmake module 2024-03-10 09:07:33 -07:00
GetGitRevisionDescription.cmake Fix various typos (docs/build scripts/tests) 2023-07-03 08:35:37 -07:00
GetGitRevisionDescription.cmake.in cmake: generate git hash using GetRevisionDescription CMake module 2023-01-08 18:20:56 +01:00
PkgConfigHelper.cmake cmake: use *_STATIC_* variables when linking to a static ffmpeg 2023-10-10 03:32:46 -07:00
SDL3Config.cmake.in cmake: set SYSTEM property in SDL3Config.cmake for compatibility with older CMake versions 2024-04-01 20:09:51 +02:00
SDL3jarTargets.cmake.in cmake: create and install SDL3::Jar target for Android 2023-11-23 02:13:08 +01:00
cmake_uninstall.cmake.in cmake: declutter root + remove obsolete variables 2022-12-19 09:19:45 -08:00
macros.cmake cmake: allow hidapi to use libusb on Windows 2024-03-10 09:07:33 -07:00
sdl3.pc.in Don't provide the SDL3 header path 2023-08-31 11:41:37 -07:00
sdlchecks.cmake cmake: Fix ALSA "Unable to find..." warning 2024-04-06 12:19:55 -04:00
sdlcompilers.cmake cmake: add -Wimplicit-fallthrough warning 2024-03-18 20:34:50 +01:00
sdlmanpages.cmake cmake: make HEADERS_DIR a required argument of SDL_generate_manpages 2023-09-29 03:42:33 +02:00
sdlplatform.cmake cmake: fix typo in cmake/sdlplatform.cmake 2024-04-02 23:44:15 +02:00
sdltargets.cmake cmake: file(RELATIVE_PATH) needs 2 absolute paths 2023-10-30 19:50:35 +01:00
xxd.py xxd.py: always write \n line endings 2023-08-13 13:51:31 -07:00