1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +08:00
Files
hl2sdk/vpc_scripts/protobuf_builder.vpc
2025-02-19 18:39:00 -05:00

35 lines
1.2 KiB
Plaintext

$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\win64\2015\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 -p $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"
}
}