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

Fix SDL autodetection #2077

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions cmake/FreecivDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,16 @@ if(FREECIV_ENABLE_NLS)
endif()

# SDL2 for audio
find_package(SDL2 QUIET)
find_package(SDL2_mixer QUIET)
if (SDL2_MIXER_LIBRARIES AND SDL2_LIBRARY)
find_package(SDL2)
find_package(SDL2_mixer)
if (SDL2_MIXER_LIBRARIES AND SDL2_FOUND)
set(AUDIO_SDL TRUE)
endif()
if (NOT SDL2_LIBRARY)
message("SDL2 not found")
set(SDL2_INCLUDE_DIR "")
if (NOT SDL2_FOUND)
message(STATUS "SDL2 not found - audio support disabled")
endif()
if (NOT SDL2_MIXER_LIBRARIES)
message("SDL2_mixer not found")
message(STATUS "SDL2_mixer not found - audio support disabled")
set(SDL2_MIXER_LIBRARIES "")
set(SDL2_MIXER_INCLUDE_DIR "")
endif()
Expand Down
Loading