Commit ef62b767f92b46546738b28d1efdec09725547eb

Sam Lantinga 2022-10-23T16:34:48

Merge commit '0823b5973a28ebad2ca6d34058c12602bc8a69f0' into main

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 090852d..8a19e5b 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -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})