aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/sourcemod/setup-hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'srcds-pkgs/sourcemod/setup-hook.sh')
-rw-r--r--srcds-pkgs/sourcemod/setup-hook.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/srcds-pkgs/sourcemod/setup-hook.sh b/srcds-pkgs/sourcemod/setup-hook.sh
new file mode 100644
index 0000000..17d8617
--- /dev/null
+++ b/srcds-pkgs/sourcemod/setup-hook.sh
@@ -0,0 +1,16 @@
+SPCOMPFLAGS=${SPCOMPFLAGS:-}
+dontUseSourcepawnFindHeaders=${dontUseSourcepawnFindHeaders:-}
+sourcepawnFindHeaders(){
+ [ -n "${dontUseSourcepawnFindHeaders:-}" ] && return
+ for plug in $buildInputs; do
+ local ipath="$plug/share/addons/sourcemod/scripting/include"
+ if [ -d "$ipath" ]; then
+ echo "found sourcepawn headers: \"$ipath\""
+ SPCOMPFLAGS="$SPCOMPFLAGS -i $ipath"
+ fi
+ done
+ dontUseSourcepawnFindHeaders=1
+ export SPCOMPFLAGS dontUseSourcepawnFindHeaders
+}
+
+addEnvHooks "$targetOffset" sourcepawnFindHeaders