summaryrefslogtreecommitdiff
path: root/xmake/templates/c++/module.binary/project/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-03 22:53:00 +0800
committerruki <[email protected]>2024-04-03 22:53:00 +0800
commitdb4196b069499e6fcf0d66c66a97665414c0011d (patch)
tree8a564a22faf0bdabf81465c4e135692b98ba590a /xmake/templates/c++/module.binary/project/xmake.lua
parentd2b45f4d485d2778c5b08500365d6f0068c40b3b (diff)
add module.binary template
Diffstat (limited to 'xmake/templates/c++/module.binary/project/xmake.lua')
-rw-r--r--xmake/templates/c++/module.binary/project/xmake.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/templates/c++/module.binary/project/xmake.lua b/xmake/templates/c++/module.binary/project/xmake.lua
new file mode 100644
index 000000000..47fed5bc6
--- /dev/null
+++ b/xmake/templates/c++/module.binary/project/xmake.lua
@@ -0,0 +1,15 @@
+add_rules("mode.debug", "mode.release")
+
+add_moduledirs("modules")
+
+target("${TARGETNAME}")
+ set_kind("binary")
+ add_files("src/*.cpp")
+ on_config(function (target)
+ import("binary.bar")
+ print("binary: 1 + 1 = %s", bar.add(1, 1))
+ print("binary: 1 - 1 = %s", bar.sub(1, 1))
+ end)
+
+${FAQ}
+