use protocol buffers to do something cool

This commit is contained in:
2022-09-02 17:39:26 +02:00
parent 210da7c6a5
commit d8919ba684
25 changed files with 1219 additions and 24 deletions

View File

@ -31,6 +31,7 @@ end
dependencies.load()
workspace "mw3-server-freezer"
startproject "client"
location "./build"
objdir "%{wks.location}/obj"
targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}"
@ -104,3 +105,13 @@ dependencies.imports()
group "Dependencies"
dependencies.projects()
rule "ProtobufCompiler"
display "Protobuf compiler"
location "./build"
fileExtension ".proto"
buildmessage "Compiling %(Identity) with protoc..."
buildcommands {'@echo off', 'path "$(SolutionDir)\\..\\tools"',
'if not exist "$(ProjectDir)\\src\\proto" mkdir "$(ProjectDir)\\src\\proto"',
'protoc --error_format=msvs -I=%(RelativeDir) --cpp_out=src\\proto %(Identity)'}
buildoutputs {'$(ProjectDir)\\src\\proto\\%(Filename).pb.cc', '$(ProjectDir)\\src\\proto\\%(Filename).pb.h'}