[Premake] Update to the latest version and fix protobuf

This commit is contained in:
momo5502 2016-11-24 20:10:13 +01:00
parent c0d0c12bcd
commit 9457186abe
3 changed files with 19 additions and 3 deletions

View File

@ -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()

View File

@ -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.