forked from synfig/synfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2-build-cmake.sh
More file actions
executable file
·36 lines (28 loc) · 812 Bytes
/
2-build-cmake.sh
File metadata and controls
executable file
·36 lines (28 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -e
WORKDIR=$(dirname "$0")
cd "${WORKDIR}"
WORKDIR=$(pwd)
BUILDDIR=cmake-build
if [[ "$(uname -s)" =~ ^MSYS_NT.* ]] || [[ "$(uname -s)" =~ Msys$ ]]
then
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/opt/mlt-7.28.0/lib/pkgconfig"
fi
mkdir -p "${BUILDDIR}" && cd "${BUILDDIR}"
mode="Release"
if [[ -n $1 ]]
then
mode=$1
fi
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_BUILD_TYPE="${mode}" ..
cmake --build .
cmake --install . >/dev/null
ctest --output-on-failure
echo
echo
echo "Done. Please check your Synfig installation in"
echo " ${WORKDIR}/${BUILDDIR}/output/$mode/"
echo
echo "You can start Synfig by executing"
echo " ${WORKDIR}/${BUILDDIR}/output/$mode/bin/synfigstudio"
echo