2
0
Эх сурвалжийг харах

Build script for Unix platforms

Added a simple shell script to build on non-Windows platform.
./build.sh builds retail by default
./build.sh -d builds debug
Hitesh Kanwathirtha 10 жил өмнө
parent
commit
fa5257590e
1 өөрчлөгдсөн 28 нэмэгдсэн , 0 устгасан
  1. 28 0
      build.sh

+ 28 - 0
build.sh

@@ -0,0 +1,28 @@
+#/usr/bin/env bash
+
+if [ ! -d "BuildLinux" ]; then
+    mkdir BuildLinux;
+fi
+
+pushd BuildLinux > /dev/null
+
+DEBUG_BUILD=0
+while getopts ":d" opt; do
+    case $opt in
+        d)
+        DEBUG_BUILD=1
+        ;;
+    esac
+done
+
+if [ $DEBUG_BUILD -eq 1 ]; then
+    echo Generating Debug makefiles
+    cmake -DCMAKE_BUILD_TYPE=Debug ..
+else
+    echo Generating Retail makefiles
+    echo Building Retail;
+    cmake ..
+fi
+
+make |& tee build.log
+popd > /dev/null