Re:Xmake: A cross-platform build utility based on Lua
by numeromancer on Thursday January 29, 2026 @11:01AM
(#46811982)
I think the creators did it a disservice to xmake when they tried to unluaize the syntax. You can also do:
target("foo", {
kind = "binary",
files = { "src/*.cpp" },
includedirs = { "src" },
defines = { "FOO", "BAR=BAZ" },
})
which suits Lua better. Unfortunately you cannot do target {
name = "foo",
kind = "binary",
files = { "src/*.cpp" },
includedirs = { "src" },
defines = { "FOO", "BAR=BAZ" },
}
which would be the lua-est lua of all.
Re:Xmake: A cross-platform build utility based on Lua
by danny0z on Thursday January 29, 2026 @11:09AM
(#46812138)
It also supports this syntax.
target("foo", {
kind = "binary",
files = { "src/*.cpp" },
includedirs = { "src" },
defines = { "FOO", "BAR=BAZ" },
})
https://xmake.io/guide/project-configuration/syntax-descript...
Re:Xmake: A cross-platform build utility based on Lua
by numeromancer on Thursday January 29, 2026 @11:23AM
(#46812358)
That's what I meant: the first you can do, the second, not.
Re:Xmake: A cross-platform build utility based on Lua
by warmwaffles on Thursday January 29, 2026 @09:59AM
(#46811068)
I did not spot those in the docs. Thanks a ton. This will help my autoformatter not completely wreck my files.
It supports this syntax.
https://xmake.io/guide/project-configuration/syntax-descript...