From b01dcb775c98cc48abe65a91ef9bf093be875682 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 2 Mar 2026 23:52:25 +0800 Subject: improve template dirs --- .../module.shared/modules/shared/foo/src/foo.cpp | 22 ---------------------- .../c++/module.shared/modules/shared/foo/xmake.lua | 6 ------ 2 files changed, 28 deletions(-) delete mode 100644 xmake/templates/c++/module.shared/modules/shared/foo/src/foo.cpp delete mode 100644 xmake/templates/c++/module.shared/modules/shared/foo/xmake.lua (limited to 'xmake/templates/c++/module.shared/modules/shared/foo') diff --git a/xmake/templates/c++/module.shared/modules/shared/foo/src/foo.cpp b/xmake/templates/c++/module.shared/modules/shared/foo/src/foo.cpp deleted file mode 100644 index adde214ca..000000000 --- a/xmake/templates/c++/module.shared/modules/shared/foo/src/foo.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include - -static int add(lua_State *lua) { - int a = lua_tointeger(lua, 1); - int b = lua_tointeger(lua, 2); - lua_pushinteger(lua, a + b); - return 1; -} - -static int sub(lua_State *lua) { - int a = lua_tointeger(lua, 1); - int b = lua_tointeger(lua, 2); - lua_pushinteger(lua, a - b); - return 1; -} - -int luaopen(foo, lua_State *lua) { - static const luaL_Reg funcs[] = { { "add", add }, { "sub", sub }, { NULL, NULL } }; - lua_newtable(lua); - luaL_setfuncs(lua, funcs, 0); - return 1; -} diff --git a/xmake/templates/c++/module.shared/modules/shared/foo/xmake.lua b/xmake/templates/c++/module.shared/modules/shared/foo/xmake.lua deleted file mode 100644 index 9b3423d41..000000000 --- a/xmake/templates/c++/module.shared/modules/shared/foo/xmake.lua +++ /dev/null @@ -1,6 +0,0 @@ -add_rules("mode.debug", "mode.release") - -target("foo") - add_rules("module.shared") - add_files("src/foo.cpp") - -- cgit v1.3.1