From af01d22ccda93ac33fde00115ba2282bb76f4fa0 Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Sun, 12 Jan 2025 14:24:07 +0800 Subject: [PATCH] Update usage of rule lua.native-objects, nodejs.module --- xmake/rules/lua/native-objects/xmake.lua | 4 ++-- xmake/rules/nodejs/module/xmake.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xmake/rules/lua/native-objects/xmake.lua b/xmake/rules/lua/native-objects/xmake.lua index 7954310dd7..74ce19b38f 100644 --- a/xmake/rules/lua/native-objects/xmake.lua +++ b/xmake/rules/lua/native-objects/xmake.lua @@ -22,14 +22,14 @@ -- -- target("foo") -- do --- add_rules("luarocks.module", "lua-native-objects", "c") +-- add_rules("lua.module", "lua.native-objects", "c") -- add_files("*.nobj.lua") -- end rule("lua.native-objects") set_extensions(".nobj.lua") before_buildcmd_file(function(target, batchcmds, sourcefile, opt) -- get c source file for lua.native-objects - local dirname = path.join(target:autogendir(), "rules", "lua-native-objects") + local dirname = path.join(target:autogendir(), "rules", "lua", "native-objects") local sourcefile_c = path.join(dirname, path.basename(sourcefile) .. ".c") -- add objectfile diff --git a/xmake/rules/nodejs/module/xmake.lua b/xmake/rules/nodejs/module/xmake.lua index 7e419dff11..878429483c 100644 --- a/xmake/rules/nodejs/module/xmake.lua +++ b/xmake/rules/nodejs/module/xmake.lua @@ -20,13 +20,13 @@ -- usage: -- --- npm add -D node-addon-api node-api-headers +-- add_requires("node-addon-api") -- -- target("foo") -- do -- set_languages("cxx17") -- add_rules("nodejs.module") --- add_includedirs("node_modules/node-addon-api", "node_modules/node-api-headers/include") +-- add_packages("node-addon-api") -- add_files("*.cc") -- end rule("nodejs.module")