SDL: Fixed build on CMake older than 3.7

From 6c9907dd0e82507b7da1bb9b1cfee04d96360102 Mon Sep 17 00:00:00 2001
From: Wohlstand <[EMAIL REDACTED]>
Date: Sat, 18 Dec 2021 17:15:08 +0300
Subject: [PATCH] Fixed build on CMake older than 3.7

I found this accidentally when I tried to use CMake 3.0 to build this.
---
 cmake/sdlchecks.cmake | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 6d20d46a25c..919a71f3319 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -646,7 +646,16 @@ macro(CheckWayland)
       endif()
       string(REPLACE "wayland-scanner " "" WAYLAND_SCANNER_VERSION ${WAYLAND_SCANNER_VERSION})
 
-      string(COMPARE GREATER_EQUAL ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_1_15_FOUND)
+      if(CMAKE_VERSION VERSION_LESS 3.7.0)
+        string(COMPARE GREATER ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_1_15_FOUND_G)
+        string(COMPARE EQUAL ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_1_15_FOUND_E)
+        if(WAYLAND_SCANNER_1_15_FOUND_G OR WAYLAND_SCANNER_1_15_FOUND_E)
+          set(WAYLAND_SCANNER_1_15_FOUND TRUE)
+        endif()
+      else()
+        string(COMPARE GREATER_EQUAL ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_1_15_FOUND)
+      endif()
+
       if(WAYLAND_SCANNER_1_15_FOUND)
         set(WAYLAND_SCANNER_CODE_MODE "private-code")
       else()