-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Is your feature request related to a problem? Please describe.
Currently, luarocks build backend for xmake just run xmake install -o output, then install output/lib and lua. Perhaps we can provide more flexible method, provide some variables in xmake:
xmake.lua:
target("bar")
do
set_prefixdir("$(prefix)/lib", { libdir = "foo" })
add_rules("lua.module")
add_files("*.c")
add_installfiles("usage.md", {prefixdir= "$(prefix)/doc"})
add_installfiles("example.conf", {prefixdir= "$(prefix)/conf"})
add_installfiles("(foo/init.lua)", {prefixdir= "$(prefix)/lua"})
end$ find .
lib/foo/bar.so
lua/foo/init.lua
conf/example.conf
doc/usage.md
Describe the solution you'd like
not directly load user's xmake.lua, we generate a xmake.lua and load it:
option("prefix")
do
set_default("XXX")
end
includes"/the/path/of/user's/xmake.lua"Then user can use $(prefix) or more xmake variables in their xmake.lua.
Describe alternatives you've considered
Or xmake support directly pass options. xmake f -D prefix=XXX user's/xmake.lua. like cmake -D.
Additional context
Here is similar thought for python backend.
Metadata
Metadata
Assignees
Labels
No labels