]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - cmake/qcc.sh
Make command names translatable in the infomessages panel
[xonotic/xonotic-data.pk3dir.git] / cmake / qcc.sh
1 #!/bin/bash
2 CPP=${CPP:-cpp}
3 QCC=${QCC:-$PWD/../../gmqcc/gmqcc${CMAKE_EXECUTABLE_SUFFIX}}
4 case $1 in
5     compile)
6         ${CPP} ${@:3} | sed 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' > $2
7     ;;
8     link)
9         ${QCC} \
10         -std=gmqcc \
11         -Ooverlap-locals \
12         -O3 \
13         -Werror -Wall \
14         -Wno-field-redeclared \
15         -flno -futf8 -fno-bail-on-werror \
16         -frelaxed-switch -freturn-assignments \
17         ${@:2}
18     ;;
19 esac