From 74aa4b635cb13d8d54eb15d84d37f687b3413311 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 3 Aug 2021 03:10:14 -0400 Subject: [PATCH] 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. --- cmake/sdlchecks.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index 8df592549..dc58c5656 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -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)