mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-29 07:59:11 +00:00
cmake: fail configuring when no X11 or wayland could be found (#11310)
It's still possible to build SDL by configuring with -DSDL_NO_UNIX_DESKTOP_SANITY_CHECK=ON
This commit is contained in:
parent
540db0d164
commit
e8b69b03fe
3 changed files with 27 additions and 5 deletions
cmake
|
@ -394,11 +394,21 @@ function(SDL_PrintSummary)
|
|||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN))
|
||||
if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN OR HAIKU OR RISCOS))
|
||||
if(NOT (HAVE_X11 OR HAVE_WAYLAND))
|
||||
message(STATUS "SDL is being built without a X11 or wayland video driver.")
|
||||
message(STATUS "The library will not be able to create windows on most unix environments.")
|
||||
message(STATUS "")
|
||||
if(NOT SDL_UNIX_CONSOLE_BUILD)
|
||||
message(FATAL_ERROR
|
||||
"SDL could not find X11 or Wayland development libraries on your system. "
|
||||
"This means SDL will not be able to create windows on a typical unix operating system. "
|
||||
"Most likely, this is not wanted."
|
||||
"\n"
|
||||
"On Linux, install the packages listed at "
|
||||
"https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies "
|
||||
"\n"
|
||||
"If you really don't need desktop windows, the documentation tells you how to skip this check. "
|
||||
"https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-support\n"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue