2015-09-15 12:29:02 +00:00
|
|
|
#!/bin/bash
|
2015-09-14 17:02:50 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# Script for building with CMake on Skia build bots.
|
|
|
|
# If you have CMake installed on your system, you can just use it normally.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2015-09-15 17:17:08 +00:00
|
|
|
here=$(cd `dirname $0`; echo `pwd`)
|
2015-09-14 17:02:50 +00:00
|
|
|
cores=32
|
|
|
|
|
2015-09-14 19:02:32 +00:00
|
|
|
if [[ -z "$BUILDTYPE" || -z "$SKIA_OUT" ]]; then
|
|
|
|
echo "If you're a bot, you should be setting BUILDTYPE ($BUILDTYPE) and SKIA_OUT ($SKIA_OUT)."
|
|
|
|
echo "If you're not a bot, you don't want to run this script."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-14 17:02:50 +00:00
|
|
|
echo "Bootstrapping CMake"
|
|
|
|
pushd $here/../third_party/externals/cmake
|
|
|
|
./bootstrap --parallel=$cores
|
2015-09-15 17:17:08 +00:00
|
|
|
make -j $cores cmake
|
2015-09-14 17:02:50 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
echo "Building with bootstrapped CMake"
|
2016-04-25 13:29:21 +00:00
|
|
|
mkdir -p $SKIA_OUT/$BUILDTYPE
|
|
|
|
pushd $SKIA_OUT/$BUILDTYPE
|
2015-09-14 19:02:32 +00:00
|
|
|
$here/../third_party/externals/cmake/bin/cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE $here -G Ninja
|
2015-09-15 13:07:47 +00:00
|
|
|
ninja
|
2015-09-14 17:02:50 +00:00
|
|
|
popd
|