diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index b472a598c..d23d4b8b9 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -646,19 +646,11 @@ macro(CheckWayland) endif() string(REPLACE "wayland-scanner " "" WAYLAND_SCANNER_VERSION ${WAYLAND_SCANNER_VERSION}) - if(CMAKE_VERSION VERSION_LESS 3.7.0) - string(COMPARE LESS ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_1_15_NOTFOUND) - if(NOT WAYLAND_SCANNER_1_15_NOTFOUND) - 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() + string(COMPARE LESS ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_PRE_1_15) + if(WAYLAND_SCANNER_PRE_1_15) set(WAYLAND_SCANNER_CODE_MODE "code") + else() + set(WAYLAND_SCANNER_CODE_MODE "private-code") endif() endif()