Changing how the game is build.

This commit is contained in:
Faerbit 2015-03-11 12:25:46 +01:00
parent bc8315db35
commit 8e18b24f94
2 changed files with 12 additions and 5 deletions

View File

@ -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

View File

@ -21,7 +21,7 @@ then
./build.sh clean
fi
./build.sh $platform
./build.sh $platform Release
rc=$?