diff --git a/README.md b/README.md index 0c901f3e37..531414aba1 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ and tools. To build Filament, you must first install the following tools: -- CMake 3.12 (or more recent) +- CMake 3.10 (or more recent) - clang 7.0 (or more recent) - [ninja 1.8](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) (or more recent) diff --git a/build.sh b/build.sh index 0569e7150c..3210b4d059 100755 --- a/build.sh +++ b/build.sh @@ -494,9 +494,10 @@ function validate_build_command { # We allow CI builds to skip CMake version check if [[ "$SKIP_CMAKE_VERSION_CHECK" != "true" ]]; then - if [[ `cmake --version` =~ ([0-9]+)\.([0-9]+)\.[0-9]+ ]]; then - if [[ "${BASH_REMATCH[1]}" -lt "3" ]] || [[ "${BASH_REMATCH[2]}" -lt "12" ]]; then - echo "Error: cmake version 3.12+ is required, ${BASH_REMATCH[1]}.${BASH_REMATCH[2]} installed, exiting" + cmake_version=`cmake --version` + if [[ "$cmake_version" =~ ([0-9]+)\.([0-9]+)\.[0-9]+ ]]; then + if [[ "${BASH_REMATCH[1]}" -lt "3" ]] || [[ "${BASH_REMATCH[2]}" -lt "10" ]]; then + echo "Error: cmake version 3.10+ is required, ${BASH_REMATCH[1]}.${BASH_REMATCH[2]} installed, exiting" exit 1 fi fi