diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk index 08fe7c431e..ba287d244a 100644 --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -53,10 +53,6 @@ define inner-cmake-package $(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES -# Some packages requires CMake 3.0.0 but latest CMake requires >=3.5 -# Set the policy version minimum to force these packages to 3.5 or greater. -$(2)_CONF_OPTS += -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - # The default backend, unless specified by the package $(3)_CMAKE_BACKEND ?= make diff --git a/support/dependencies/check-host-cmake.sh b/support/dependencies/check-host-cmake.sh index fadeae9f6b..c7aa16f48d 100755 --- a/support/dependencies/check-host-cmake.sh +++ b/support/dependencies/check-host-cmake.sh @@ -6,6 +6,9 @@ major_min="${1%.*}" minor_min="${1#*.}" +major_max="4" +minor_max="0" + shift for candidate; do @@ -32,6 +35,12 @@ for candidate; do major="${version%.*}" minor="${version#*.}" + if [ ${major} -gt ${major_max} ]; then + continue + elif [ ${major} -eq ${major_max} -a ${minor} -ge ${minor_max} ]; then + continue + fi + if [ ${major} -gt ${major_min} ]; then echo "${cmake}" exit