cmake: fix finding wayland-libdecor

It was broken in 11d53c84a7
This commit is contained in:
Anonymous Maarten 2022-10-21 15:31:43 +02:00
parent 4264c0b674
commit 0823b5973a

View File

@ -699,7 +699,7 @@ macro(CheckWayland)
if(SDL_WAYLAND_LIBDECOR)
pkg_check_modules(PKG_LIBDECOR libdecor-0)
if(PKG_LIBDECOR)
if(PKG_LIBDECOR_FOUND)
set(HAVE_WAYLAND_LIBDECOR TRUE)
set(HAVE_LIBDECOR_H 1)
target_link_directories(sdl-build-options INTERFACE "${PKG_LIBDECOR_LIBRARY_DIRS}")
@ -709,7 +709,7 @@ macro(CheckWayland)
endif()
FindLibraryAndSONAME(decor-0 LIBDIRS ${PKG_LIBDECOR_LIBRARY_DIRS})
if(SDL_WAYLAND_LIBDECOR_SHARED AND DECOR_0_LIB AND HAVE_SDL_LOADSO)
set(HAVE_LIBDECOR_SHARED TRUE)
set(HAVE_WAYLAND_LIBDECOR_SHARED TRUE)
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
else()
list(APPEND EXTRA_LIBS ${PKG_LIBDECOR_LIBRARIES})