[system-dependencies] Add CMake dependency. (#920)

This commit is contained in:
Rolf Bjarne Kvinge 2016-09-30 21:46:40 +02:00 коммит произвёл Sebastien Pouliot
Родитель 0863e412b4
Коммит 3f74be5a80
3 изменённых файлов: 40 добавлений и 0 удалений

Просмотреть файл

@ -62,6 +62,10 @@ MIN_XAMARIN_STUDIO_URL=https://files.xamarin.com/~rolf/XamarinStudio-6.1.0.4373.
MIN_XAMARIN_STUDIO_VERSION=6.1.0.4373
MAX_XAMARIN_STUDIO_VERSION=6.2.0.9999
# Minimum CMake version
MIN_CMAKE_URL=https://cmake.org/files/v3.6/cmake-3.6.2-Darwin-x86_64.dmg
MIN_CMAKE_VERSION=2.8.8
# Minimum OSX versions
MIN_OSX_BUILD_VERSION=10.11
MIN_OSX_VERSION_FOR_IOS=10.11

Просмотреть файл

@ -21,6 +21,17 @@ You can download continuous builds of our main development branches from [our wi
$ brew update
$ brew install libtool autoconf automake bison flex
* CMake
You can use brew, or download manually from [cmake.org](https://cmake.org/download/).
CMake must be in PATH, so if you install it somewhere else, you'll have to
fix up your PATH accordingly (not necessary if installed using brew).
To install using brew:
$ brew install cmake
* Xcode
To build the Xamarin.iOS and Xamarin.Mac SDKs you need a certain version of Xcode.

Просмотреть файл

@ -52,6 +52,10 @@ while ! test -z $1; do
IGNORE_AUTOTOOLS=1
shift
;;
--ignore-cmake)
IGNORE_CMAKE=1
shift
;;
*)
echo "Unknown argument: $1"
exit 1
@ -455,6 +459,26 @@ function check_osx_version () {
ok "Found OSX $ACTUAL_OSX_VERSION (at least $MIN_OSX_BUILD_VERSION is required)"
}
function check_cmake () {
if ! test -z $IGNORE_CMAKE; then return; fi
local MIN_CMAKE_VERSION=`grep MIN_CMAKE_VERSION= Make.config | sed 's/.*=//'`
local CMAKE_URL=`grep CMAKE_URL= Make.config | sed 's/.*=//'`
if ! cmake --version &> /dev/null; then
fail "You must install CMake ($CMAKE_URL)"
return
fi
ACTUAL_CMAKE_VERSION=$(cmake --version | grep "cmake version" | sed 's/cmake version //')
if ! is_at_least_version $ACTUAL_CMAKE_VERSION $MIN_CMAKE_VERSION; then
fail "You must have at least CMake $MIN_CMAKE_VERSION (found $ACTUAL_CMAKE_VERSION)"
return
fi
ok "Found CMake $ACTUAL_CMAKE_VERSION (at least $MIN_CMAKE_VERSION is required)"
}
echo "Checking system..."
check_osx_version
@ -462,6 +486,7 @@ check_xcode
check_autotools
check_mono
check_xamarin_studio
check_cmake
if test -z $FAIL; then
echo "System check succeeded"