summaryrefslogtreecommitdiff
path: root/vpc_scripts/protobuf_builder.vpc
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /vpc_scripts/protobuf_builder.vpc
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'vpc_scripts/protobuf_builder.vpc')
-rw-r--r--vpc_scripts/protobuf_builder.vpc39
1 files changed, 39 insertions, 0 deletions
diff --git a/vpc_scripts/protobuf_builder.vpc b/vpc_scripts/protobuf_builder.vpc
new file mode 100644
index 0000000..a1056cb
--- /dev/null
+++ b/vpc_scripts/protobuf_builder.vpc
@@ -0,0 +1,39 @@
+
+$MacroRequired GENERATED_PROTO_DIR
+
+// If set, included on the commandline
+$MacroRequiredAllowEmpty ADDITIONAL_PROTOC_ARGS
+
+
+$CustomBuildStep "proto"
+{
+ $Description "Running Protocol Buffer Compiler on $(InputFileName)..."
+ $CommandLine "if not exist $GENERATED_PROTO_DIR mkdir $GENERATED_PROTO_DIR" "\n" \
+ "$SRCDIR\thirdparty\protobuf-2.6.1\bin\win32\2013\staticcrt\release\protoc.exe --proto_path=$SRCDIR\thirdparty\protobuf-2.6.1\src" \
+ " --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --proto_path=$SRCDIR\game\shared" \
+ " $ADDITIONAL_PROTOC_ARGS --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$WINDOWS]
+
+ $CommandLine "mkdir $GENERATED_PROTO_DIR 2> /dev/null;" \
+ "$SRCDIR/thirdparty/protobuf-2.6.1/bin/osx32/libc++/protoc" \
+ " --proto_path=$SRCDIR/thirdparty/protobuf-2.6.1/src --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --proto_path=$SRCDIR\game\shared" \
+ " $ADDITIONAL_PROTOC_ARGS --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$OSXALL]
+
+ $CommandLine "mkdir $GENERATED_PROTO_DIR 2> /dev/null;" \
+ "$SRCDIR/thirdparty/protobuf-2.6.1/bin/linux32/protoc --proto_path=$SRCDIR\thirdparty\protobuf-2.6.1\src" \
+ " --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --proto_path=$SRCDIR\game\shared" \
+ " $ADDITIONAL_PROTOC_ARGS --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$LINUXALL]
+
+ $Outputs "$GENERATED_PROTO_DIR\$(InputName).pb.cc;$GENERATED_PROTO_DIR\$(InputName).pb.h"
+}
+
+
+$Configuration
+{
+ $Compiler
+ {
+ // General
+ $AdditionalIncludeDirectories "$BASE;$GENERATED_PROTO_DIR;$SRCDIR\thirdparty\protobuf-2.6.1\src"
+ }
+}
+
+