summaryrefslogtreecommitdiff
path: root/vpc_scripts/protobuf_builder.vpc
blob: a1056cb4039dfe7417c3a63a874618eabc1e7ee9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"
	}
}