[Premake] Fix protobuf code generation

This commit is contained in:
momo5502 2016-11-24 20:30:49 +01:00
parent 9457186abe
commit 90a9b72aac
2 changed files with 2 additions and 12 deletions

View File

@ -37,6 +37,7 @@ function protobuf.project()
files
{
path.join(protobuf.settings.source, "src/**.cc"),
"./src/**.proto",
}
removefiles
{
@ -54,17 +55,6 @@ function protobuf.project()
-- Generate source code from protobuf definitions
rules { "ProtobufCompiler" }
-- Workaround: Consume protobuf generated source files
matches = os.matchfiles(path.join("src/Proto/**.proto"))
for i, srcPath in ipairs(matches) do
basename = path.getbasename(srcPath)
files
{
string.format("%%{prj.location}/src/proto/%s.pb.h", basename),
string.format("%%{prj.location}/src/proto/%s.pb.cc", basename),
}
end
-- dependencies
zlib.import()

View File

@ -300,7 +300,7 @@ workspace "iw4x"
"./src/**.rc",
"./src/**.hpp",
"./src/**.cpp",
"./src/**.proto",
--"./src/**.proto",
}
includedirs {
"%{prj.location}/src",