mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Ubuntu/cmake: Improve error messages when SDL3 is missing
This commit is contained in:
+16
-2
@@ -324,9 +324,23 @@ set(SDL_TTF_LIB_TARGET "")
|
|||||||
set(FONTCONFIG_LIB_TARGET "")
|
set(FONTCONFIG_LIB_TARGET "")
|
||||||
|
|
||||||
if(NOT LIBRETRO AND NOT IOS AND NOT LOONGARCH64_DEVICE AND NOT ANDROID)
|
if(NOT LIBRETRO AND NOT IOS AND NOT LOONGARCH64_DEVICE AND NOT ANDROID)
|
||||||
find_package(SDL3 REQUIRED)
|
find_package(SDL3 QUIET)
|
||||||
|
if(NOT SDL3_FOUND)
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND (EXISTS "/usr/bin/apt" OR EXISTS "/usr/bin/apt-get" OR EXISTS "/etc/debian_version"))
|
||||||
|
message(FATAL_ERROR "SDL3 not found. Install dependencies with: sudo apt install libsdl3-dev libsdl3-ttf-dev")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "SDL3 not found. Install SDL3 development packages for your distribution and retry.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
set(SDL_LIB_TARGET SDL3::SDL3)
|
set(SDL_LIB_TARGET SDL3::SDL3)
|
||||||
find_package(SDL3_ttf REQUIRED)
|
find_package(SDL3_ttf QUIET)
|
||||||
|
if(NOT SDL3_ttf_FOUND)
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND (EXISTS "/usr/bin/apt" OR EXISTS "/usr/bin/apt-get" OR EXISTS "/etc/debian_version"))
|
||||||
|
message(FATAL_ERROR "SDL3_ttf not found. Install dependencies with: sudo apt install libsdl3-ttf-dev")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "SDL3_ttf not found. Install SDL3_ttf development packages for your distribution and retry.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
set(SDL_TTF_LIB_TARGET SDL3_ttf::SDL3_ttf)
|
set(SDL_TTF_LIB_TARGET SDL3_ttf::SDL3_ttf)
|
||||||
message(STATUS "Using SDL3 and SDL3_ttf")
|
message(STATUS "Using SDL3 and SDL3_ttf")
|
||||||
add_compile_definitions(USE_SDL3_TTF)
|
add_compile_definitions(USE_SDL3_TTF)
|
||||||
|
|||||||
Reference in New Issue
Block a user