Commit 6c9907dd0e82507b7da1bb9b1cfee04d96360102

Wohlstand 2021-12-18T17:15:08

Fixed build on CMake older than 3.7 I found this accidentally when I tried to use CMake 3.0 to build this.

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 6d20d46..919a71f 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()