summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/projects/other/native_module/.gitignore8
-rw-r--r--tests/projects/other/native_module/src/main.cpp9
-rw-r--r--tests/projects/other/native_module/xmake.lua14
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/projects/other/native_module/.gitignore b/tests/projects/other/native_module/.gitignore
new file mode 100644
index 000000000..152105761
--- /dev/null
+++ b/tests/projects/other/native_module/.gitignore
@@ -0,0 +1,8 @@
+# Xmake cache
+.xmake/
+build/
+
+# MacOS Cache
+.DS_Store
+
+
diff --git a/tests/projects/other/native_module/src/main.cpp b/tests/projects/other/native_module/src/main.cpp
new file mode 100644
index 000000000..7c435d251
--- /dev/null
+++ b/tests/projects/other/native_module/src/main.cpp
@@ -0,0 +1,9 @@
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+ cout << "hello world!" << endl;
+ return 0;
+}
diff --git a/tests/projects/other/native_module/xmake.lua b/tests/projects/other/native_module/xmake.lua
new file mode 100644
index 000000000..98a02399e
--- /dev/null
+++ b/tests/projects/other/native_module/xmake.lua
@@ -0,0 +1,14 @@
+add_rules("mode.debug", "mode.release")
+
+add_moduledirs("modules")
+
+target("test")
+ set_kind("binary")
+ add_files("src/*.cpp")
+ on_config(function (target)
+ import("shared.foo")
+-- import("binary.bar")
+ print("1 + 1 = %d", foo.add(1, 1))
+-- print("1 - 1 = %s", bar.sub("1", "1"))
+ end)
+