Archived
1
0

Updating keyboard build scripts to work in Cygwin

See wiki for setup details -> https://github.com/kiibohd/controller/wiki/Windows-Setup
This commit is contained in:
Jacob Alexander 2016-07-31 20:41:00 -07:00
parent 9309889fad
commit 014a42829b

View File

@ -84,11 +84,25 @@ done
# Run CMake commands
## TODO Check for windows and do windows specific things ##
mkdir -p "${BuildPath}"
cd "${BuildPath}"
# Cygwin
if [[ $(uname -s) == MINGW32_NT* ]] || [[ $(uname -s) == CYGWIN* ]]; then
if [[ -z "$wincmake_path" ]]; then
echo "Error wincmake_path environment variable has not been set, see -> https://github.com/kiibohd/controller/wiki/Windows-Setup"
exit 1
fi
PATH="$wincmake_path":"${PATH}" cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" -DScanModule="${ScanModule}" -DMacroModule="${MacroModule}" -DOutputModule="${OutputModule}" -DDebugModule="${DebugModule}" -DBaseMap="${BaseMap}" -DDefaultMap="${DefaultMap}" -DPartialMaps="${PartialMapsExpanded}" "${CMakeListsPath}" -G 'Unix Makefiles'
return_code=$?
# Linux / Mac (and everything else)
else
cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" -DScanModule="${ScanModule}" -DMacroModule="${MacroModule}" -DOutputModule="${OutputModule}" -DDebugModule="${DebugModule}" -DBaseMap="${BaseMap}" -DDefaultMap="${DefaultMap}" -DPartialMaps="${PartialMapsExpanded}" "${CMakeListsPath}"
return_code=$?
fi
if [ $return_code != 0 ] ; then
echo "Error in cmake. Exiting..."
exit $return_code