[Premake] Fix protobuf code generation
This commit is contained in:
parent
9457186abe
commit
90a9b72aac
@ -37,6 +37,7 @@ function protobuf.project()
|
|||||||
files
|
files
|
||||||
{
|
{
|
||||||
path.join(protobuf.settings.source, "src/**.cc"),
|
path.join(protobuf.settings.source, "src/**.cc"),
|
||||||
|
"./src/**.proto",
|
||||||
}
|
}
|
||||||
removefiles
|
removefiles
|
||||||
{
|
{
|
||||||
@ -54,17 +55,6 @@ function protobuf.project()
|
|||||||
-- Generate source code from protobuf definitions
|
-- Generate source code from protobuf definitions
|
||||||
rules { "ProtobufCompiler" }
|
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
|
-- dependencies
|
||||||
zlib.import()
|
zlib.import()
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ workspace "iw4x"
|
|||||||
"./src/**.rc",
|
"./src/**.rc",
|
||||||
"./src/**.hpp",
|
"./src/**.hpp",
|
||||||
"./src/**.cpp",
|
"./src/**.cpp",
|
||||||
"./src/**.proto",
|
--"./src/**.proto",
|
||||||
}
|
}
|
||||||
includedirs {
|
includedirs {
|
||||||
"%{prj.location}/src",
|
"%{prj.location}/src",
|
||||||
|
Loading…
Reference in New Issue
Block a user