summaryrefslogtreecommitdiff
path: root/tests/projects/other/native_module_cjson/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-04 00:59:22 +0800
committerruki <[email protected]>2024-04-04 00:59:22 +0800
commit5c56dcd60dcce02babbcba862d71f3f891a712a4 (patch)
tree5acbf1b948f9e54d20b4ab58fdfdba04e85a2ca5 /tests/projects/other/native_module_cjson/xmake.lua
parent89554d9ad26995b1732d8f36f197186ec23b8d40 (diff)
add cjson test
Diffstat (limited to 'tests/projects/other/native_module_cjson/xmake.lua')
-rw-r--r--tests/projects/other/native_module_cjson/xmake.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/projects/other/native_module_cjson/xmake.lua b/tests/projects/other/native_module_cjson/xmake.lua
new file mode 100644
index 000000000..8768aca3e
--- /dev/null
+++ b/tests/projects/other/native_module_cjson/xmake.lua
@@ -0,0 +1,12 @@
+add_rules("mode.debug", "mode.release")
+
+add_moduledirs("modules")
+
+target("test")
+ set_kind("binary")
+ add_files("src/*.cpp")
+ on_config(function (target)
+ import("lua.cjson", {always_build = true})
+ print(cjson.decode('{"foo": 1, "bar": [1, 2, 3]}'))
+ end)
+