From b7e729e2be26b75ae0922f61cb56df3d6e98b86d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 16 Sep 2014 15:36:35 +0300 Subject: [PATCH] Fix and improve BuildLinux.sh --- BuildLinux.sh | 53 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/BuildLinux.sh b/BuildLinux.sh index aa2a8eff5..fe29e3acf 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -1,21 +1,54 @@ #!/bin/bash # ~/bin/build-polycode +set -euv +basedir=$(pwd) -mkdir -p Dependencies/Build/Debug Dependencies/Build/Release Build/Debug Build/Release Standalone/Build -cd Dependencies/Build/Debug +# NOTE: The build system does not install any files into CMAKE_INSTALL_PREFIX, +# but instead builds everything in the source tree. + +# You can supply parameters to make by passing them as parameters to this +# script. For example -j may be useful. + +# Build dependencies + +mkdir -p "$basedir/Dependencies/Build/Debug" +cd "$basedir/Dependencies/Build/Debug" cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../.. -make -cd ../Release +make $@ + +mkdir -p "$basedir/Dependencies/Build/Release" +cd "$basedir/Dependencies/Build/Release" cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../.. -make -cd ../../../Build/Debug +make $@ + +# Build core + +mkdir -p "$basedir/Build/Debug" +cd "$basedir/Build/Debug" cmake -G "Unix Makefiles" -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=/usr/bin/python2 ../.. -make +make $@ +make $@ PolycodeLua make install -cd ../Release + +mkdir -p "$basedir/Build/Release" +cd "$basedir/Build/Release" cmake -G "Unix Makefiles" -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python2 ../.. -make +make $@ +make $@ PolycodeLua make install -cd ../../Standalone/Build + +# Build standalone + +mkdir -p "$basedir/Standalone/Build" +cd "$basedir/Standalone/Build" cmake -G "Unix Makefiles" .. make install + +# Build IDE + +mkdir -p "$basedir/IDE/Build/Linux" +cd "$basedir/IDE/Build/Linux" +make $@ +# IDE executable is found in "$basedir/IDE/Build/Linux/Build" + +