cmake: don't fail if Wayland is enabled but libdecor isn't found.

Instead, just disable libdecor support.

This matches what the configure script does.
This commit is contained in:
Ryan C. Gordon 2021-08-03 03:10:14 -04:00
parent c308453952
commit 74aa4b635c
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 7 additions and 6 deletions

View File

@ -698,12 +698,13 @@ macro(CheckWayland)
endif()
if(WAYLAND_LIBDECOR)
pkg_check_modules(libdecor REQUIRED libdecor-0)
FindLibraryAndSONAME(decor-0)
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
add_definitions(-DHAVE_LIBDECOR_H)
pkg_check_modules(PKG_LIBDECOR libdecor-0)
if(PKG_LIBDECOR_FOUND)
set(HAVE_WAYLAND_LIBDECOR TRUE)
FindLibraryAndSONAME(decor-0)
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
add_definitions(-DHAVE_LIBDECOR_H)
endif()
endif()
set(SDL_VIDEO_DRIVER_WAYLAND 1)