diff options
Diffstat (limited to 'tests/projects')
| -rw-r--r-- | tests/projects/xmake_cli/hello/src/lni/main.c | 17 | ||||
| -rw-r--r-- | tests/projects/xmake_cli/hello/src/lua/main.lua | 3 | ||||
| -rw-r--r-- | tests/projects/xmake_cli/hello/xmake.lua | 7 |
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/projects/xmake_cli/hello/src/lni/main.c b/tests/projects/xmake_cli/hello/src/lni/main.c new file mode 100644 index 000000000..6e75791ed --- /dev/null +++ b/tests/projects/xmake_cli/hello/src/lni/main.c @@ -0,0 +1,17 @@ +#include <xmake/xmake.h> + +tb_int_t main(tb_int_t argc, tb_char_t** argv) +{ + tb_int_t ok = -1; + if (xm_init()) + { + xm_engine_ref_t engine = xm_engine_init(); + if (engine) + { + ok = xm_engine_main(engine, argc, argv); + xm_engine_exit(engine); + } + xm_exit(); + } + return ok; +} diff --git a/tests/projects/xmake_cli/hello/src/lua/main.lua b/tests/projects/xmake_cli/hello/src/lua/main.lua new file mode 100644 index 000000000..f83baddf8 --- /dev/null +++ b/tests/projects/xmake_cli/hello/src/lua/main.lua @@ -0,0 +1,3 @@ +function main () + print("hello xmake!") +end diff --git a/tests/projects/xmake_cli/hello/xmake.lua b/tests/projects/xmake_cli/hello/xmake.lua new file mode 100644 index 000000000..e2e410e03 --- /dev/null +++ b/tests/projects/xmake_cli/hello/xmake.lua @@ -0,0 +1,7 @@ +add_rules("mode.debug", "mode.release") +add_requires("libxmake") +target("hello") + add_rules("xmake.cli") + add_files("src/lni/*.c") + add_packages("libxmake") + |
