[Premake] Update to the latest version and fix protobuf
This commit is contained in:
parent
c0d0c12bcd
commit
9457186abe
@ -50,6 +50,20 @@ function protobuf.project()
|
||||
path.join(protobuf.settings.source, "src/google/protobuf/util/internal/error_listener.cc"),
|
||||
path.join(protobuf.settings.source, "**/*_gcc.cc"),
|
||||
}
|
||||
|
||||
-- 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()
|
||||
|
@ -371,7 +371,7 @@ workspace "iw4x"
|
||||
vpaths
|
||||
{
|
||||
["*"] = { "./src/**" },
|
||||
["Proto/Generated"] = { "**.pb.*" }, -- meh.
|
||||
--["Proto/Generated"] = { "**.pb.*" }, -- meh.
|
||||
}
|
||||
|
||||
-- Virtual paths
|
||||
@ -381,8 +381,8 @@ workspace "iw4x"
|
||||
["Headers/*"] = { "./src/**.hpp" },
|
||||
["Sources/*"] = { "./src/**.cpp" },
|
||||
["Resource/*"] = { "./src/**.rc" },
|
||||
["Proto/Definitions/*"] = { "./src/Proto/**.proto" },
|
||||
["Proto/Generated/*"] = { "**.pb.*" }, -- meh.
|
||||
--["Proto/Definitions/*"] = { "./src/Proto/**.proto" },
|
||||
--["Proto/Generated/*"] = { "**.pb.*" }, -- meh.
|
||||
}
|
||||
end
|
||||
|
||||
@ -433,6 +433,7 @@ workspace "iw4x"
|
||||
}
|
||||
configuration {}
|
||||
|
||||
--[[
|
||||
-- Generate source code from protobuf definitions
|
||||
rules { "ProtobufCompiler" }
|
||||
|
||||
@ -464,6 +465,7 @@ workspace "iw4x"
|
||||
"_SCL_SECURE_NO_WARNINGS",
|
||||
}
|
||||
filter {}
|
||||
]]
|
||||
|
||||
group "External dependencies"
|
||||
if not _OPTIONS["disable-bitmessage"] then
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user