summaryrefslogtreecommitdiff
path: root/tests/projects/c++/linkorders/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-27 23:23:07 +0800
committerruki <[email protected]>2023-09-27 23:23:07 +0800
commit0fd951cc540635f332a7c7379a319656c82d70b4 (patch)
tree598ce4b482a87b6801dc10361f260499fd1156b2 /tests/projects/c++/linkorders/xmake.lua
parenta7d7a3718375dc61342f283a50b297ac4ba7e007 (diff)
add link orders example
Diffstat (limited to 'tests/projects/c++/linkorders/xmake.lua')
-rw-r--r--tests/projects/c++/linkorders/xmake.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/projects/c++/linkorders/xmake.lua b/tests/projects/c++/linkorders/xmake.lua
new file mode 100644
index 000000000..b3df5f820
--- /dev/null
+++ b/tests/projects/c++/linkorders/xmake.lua
@@ -0,0 +1,18 @@
+add_rules("mode.debug", "mode.release")
+
+add_requires("libpng")
+
+target("foo")
+ set_kind("static")
+ add_files("src/foo.cpp")
+ add_packages("libpng", {public = true})
+
+target("demo")
+ set_kind("binary")
+ add_deps("foo")
+ add_files("src/main.cpp")
+ if is_plat("linux", "macosx") then
+ add_syslinks("pthread", "m")
+ end
+
+