]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - cmake/qcc.sh
Remove some more unnecessary WITHSELFs
[xonotic/xonotic-data.pk3dir.git] / cmake / qcc.sh
index 0fbd8db12a4fe40b0d9148620b8311afb94094ef..2e8ea7062576c9fda587f1f44dd4a892d25353f5 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/bash
-QCC=${QCC:-$(dirname "$0")/../../../gmqcc/gmqcc}
+CPP=${CPP:-cpp}
+QCC=${QCC:-$PWD/../../gmqcc/gmqcc${CMAKE_EXECUTABLE_SUFFIX}}
 case $1 in
     compile)
-        echo $@
-        cpp ${@:3} | sed 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' > $2
+        ${CPP} ${@:3} | sed 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' > $2
     ;;
     link)
         ${QCC} \