2018-07-23 15:21:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Copyright (C) 2016, Canonical Ltd.
|
|
|
|
# All rights reserved.
|
|
|
|
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
|
|
|
# XXX: Don't move this script
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
|
|
|
while (( "$#" )); do
|
|
|
|
if [[ $1 == "-e" ]]; then
|
|
|
|
shift
|
|
|
|
ExternalModulesPaths="$1"
|
|
|
|
fi
|
|
|
|
if [[ $1 == "-j" ]]; then
|
|
|
|
shift
|
|
|
|
JsBundlePath="$1"
|
|
|
|
fi
|
2018-08-21 13:18:16 +00:00
|
|
|
if [[ $1 == "-f" ]]; then
|
|
|
|
shift
|
|
|
|
desktopFonts="$1"
|
|
|
|
fi
|
2018-07-23 15:21:31 +00:00
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "build.sh external modules paths: "$ExternalModulesPaths
|
|
|
|
echo "build.sh JS bundle path: "$JsBundlePath
|
2018-08-21 13:18:16 +00:00
|
|
|
echo "build.sh desktop fonts: "$desktopFonts
|
2018-07-23 15:21:31 +00:00
|
|
|
|
|
|
|
# Workaround
|
|
|
|
rm -rf CMakeFiles CMakeCache.txt cmake_install.cmake Makefile
|
|
|
|
|
|
|
|
# Build project
|
2018-08-21 13:18:16 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -DEXTERNAL_MODULES_DIR="$ExternalModulesPaths" -DJS_BUNDLE_PATH="$JsBundlePath" -DDESKTOP_FONTS="$desktopFonts" . && make
|