From 8e18b24f94aaa3e7f9abc4639dc76593a2e8eff0 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Wed, 11 Mar 2015 12:25:46 +0100 Subject: [PATCH] Changing how the game is build. --- build.sh | 15 +++++++++++---- package.sh | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 375b9e8..03417ae 100755 --- a/build.sh +++ b/build.sh @@ -16,6 +16,13 @@ then cmake="cmake -DCMAKE_SYSTEM_NAME='Windows' -DCMAKE_FIND_ROOT_PATH='/usr/bin:/usr/x86_64-w64-mingw32' -DCMAKE_CXX_COMPILER='x86_64-w64-mingw32-g++' -DCMAKE_C_COMPILER='x86_64-w64-mingw32-gcc'" fi +buildType=$2 + +if [[ $2 == "" ]] +then + buildType="Debug" +fi + currentDir=$(pwd) threads=$(($(nproc)+1)) @@ -38,10 +45,10 @@ mkdir -p build cd build if hash ninja 2>/dev/null then - $cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -GNinja .. + $cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=$buildType -DBUILD_SHARED_LIBS=0 -GNinja .. ninja else - $cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 .. + $cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=$buildType -DBUILD_SHARED_LIBS=0 .. make -j$threads fi @@ -53,9 +60,9 @@ mkdir -p build cd build if hash ninja 2>/dev/null then - $cmake -DGLFW_BUILD_EXAMPLES=0 -DGLFW_BUILD_TESTS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -GNinja .. + $cmake -DGLFW_BUILD_EXAMPLES=0 -DGLFW_BUILD_TESTS=0 -DCMAKE_BUILD_TYPE=$buildType -DBUILD_SHARED_LIBS=0 -GNinja .. ninja else - $cmake -DGLFW_BUILD_EXAMPLES=0 -DGLFW_BUILD_TESTS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 .. + $cmake -DGLFW_BUILD_EXAMPLES=0 -DGLFW_BUILD_TESTS=0 -DCMAKE_BUILD_TYPE=$buildType -DBUILD_SHARED_LIBS=0 .. make -j$threads fi diff --git a/package.sh b/package.sh index f59870f..5f39705 100755 --- a/package.sh +++ b/package.sh @@ -21,7 +21,7 @@ then ./build.sh clean fi -./build.sh $platform +./build.sh $platform Release rc=$?