mirror of https://github.com/encounter/SDL.git
Fixed build on CMake older than 3.7
I found this accidentally when I tried to use CMake 3.0 to build this.
This commit is contained in:
parent
3861afacf5
commit
6c9907dd0e
|
@ -646,7 +646,16 @@ macro(CheckWayland)
|
||||||
endif()
|
endif()
|
||||||
string(REPLACE "wayland-scanner " "" WAYLAND_SCANNER_VERSION ${WAYLAND_SCANNER_VERSION})
|
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)
|
if(WAYLAND_SCANNER_1_15_FOUND)
|
||||||
set(WAYLAND_SCANNER_CODE_MODE "private-code")
|
set(WAYLAND_SCANNER_CODE_MODE "private-code")
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Reference in New Issue