summaryrefslogtreecommitdiff
path: root/tests/projects/other/native_module_cjson/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-05 16:21:00 +0800
committerGitHub <[email protected]>2024-04-05 16:21:00 +0800
commit982a307fa363ae022554df2afaa3f922c5bb0986 (patch)
tree279590bb6068b94eeade11693217b11d21e0db35 /tests/projects/other/native_module_cjson/xmake.lua
parent282e468d6cf18473bac127d260fe802e7bb64392 (diff)
parent5297e2329198a683400870382699af2f37d25ec2 (diff)
Merge pull request #4932 from xmake-io/native
Improve native shared module to remove lua package dependence
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)
+