16 lines
533 B
Lua
16 lines
533 B
Lua
|
|
rule("engine.api")
|
||
|
|
on_load(function (target)
|
||
|
|
print(target:name())
|
||
|
|
import("api_define")
|
||
|
|
api_define(target, target:name())
|
||
|
|
local deps = target:get("deps")
|
||
|
|
if not deps then return end
|
||
|
|
import("core.project.project")
|
||
|
|
local is_static = target:kind() == "static"
|
||
|
|
for _,name in ipairs(deps) do
|
||
|
|
local deptarget = project.target(name)
|
||
|
|
if deptarget:kind() == "static" then
|
||
|
|
api_define(target, name)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end)
|