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