[Premake] Fix protobuf code generation
This commit is contained in:
parent
9457186abe
commit
90a9b72aac
@ -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()
|
||||
|
||||
|
@ -300,7 +300,7 @@ workspace "iw4x"
|
||||
"./src/**.rc",
|
||||
"./src/**.hpp",
|
||||
"./src/**.cpp",
|
||||
"./src/**.proto",
|
||||
--"./src/**.proto",
|
||||
}
|
||||
includedirs {
|
||||
"%{prj.location}/src",
|
||||
|
Loading…
Reference in New Issue
Block a user