Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.6 KiB

  1. $MacroRequired GENERATED_PROTO_DIR
  2. // If set, included on the commandline
  3. $MacroRequiredAllowEmpty ADDITIONAL_PROTOC_ARGS
  4. $CustomBuildStep "proto"
  5. {
  6. $Description "Running Protocol Buffer Compiler on $(InputFileName)..."
  7. $CommandLine "if not exist $GENERATED_PROTO_DIR mkdir $GENERATED_PROTO_DIR" "\n" \
  8. "$SRCDIR\thirdparty\protobuf-2.6.1\bin\win32\2013\staticcrt\release\protoc.exe --proto_path=$SRCDIR\thirdparty\protobuf-2.6.1\src" \
  9. " --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --proto_path=$SRCDIR\game\shared" \
  10. " $ADDITIONAL_PROTOC_ARGS --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$WINDOWS]
  11. $CommandLine "mkdir $GENERATED_PROTO_DIR 2> /dev/null;" \
  12. "$SRCDIR/thirdparty/protobuf-2.6.1/bin/osx32/libc++/protoc" \
  13. " --proto_path=$SRCDIR/thirdparty/protobuf-2.6.1/src --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --proto_path=$SRCDIR\game\shared" \
  14. " $ADDITIONAL_PROTOC_ARGS --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$OSXALL]
  15. $CommandLine "mkdir $GENERATED_PROTO_DIR 2> /dev/null;" \
  16. "$SRCDIR/thirdparty/protobuf-2.6.1/bin/linux32/protoc --proto_path=$SRCDIR\thirdparty\protobuf-2.6.1\src" \
  17. " --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --proto_path=$SRCDIR\game\shared" \
  18. " $ADDITIONAL_PROTOC_ARGS --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$LINUXALL]
  19. $Outputs "$GENERATED_PROTO_DIR\$(InputName).pb.cc;$GENERATED_PROTO_DIR\$(InputName).pb.h"
  20. }
  21. $Configuration
  22. {
  23. $Compiler
  24. {
  25. // General
  26. $AdditionalIncludeDirectories "$BASE;$GENERATED_PROTO_DIR;$SRCDIR\thirdparty\protobuf-2.6.1\src"
  27. }
  28. }