Add support for MinGW cross compiling

This commit is contained in:
2016-12-23 03:41:11 -06:00
parent 1b2f87197b
commit 666f455cfd
7 changed files with 46 additions and 6 deletions
+12 -2
View File
@@ -1,8 +1,18 @@
#! /usr/bin/env bash
project=$(pwd)/
buildDir="build/release"
TARGET=$1
if [[ $TARGET == windows ]]; then
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake"
buildDir="build/windows"
else
buildDir="build/release"
fi
mkdir -p $buildDir
pushd $buildDir
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release $project
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release \
$toolchain \
$project
popd