diff options
| author | compilelife <[email protected]> | 2023-03-14 17:49:58 +0800 |
|---|---|---|
| committer | compilelife <[email protected]> | 2023-03-14 17:49:58 +0800 |
| commit | f6898c7129bfae5bfe6aa71563370d07517a81de (patch) | |
| tree | 0aebc6a50ba9a5ece590f9ed90dc24fc58c66c6c /tests/projects/swig/java_c/xmake.lua | |
| parent | 855de78c41a4866730423397f61610acfbb5f250 (diff) | |
[swig java] add demo
Diffstat (limited to 'tests/projects/swig/java_c/xmake.lua')
| -rw-r--r-- | tests/projects/swig/java_c/xmake.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/projects/swig/java_c/xmake.lua b/tests/projects/swig/java_c/xmake.lua new file mode 100644 index 000000000..65e871ce6 --- /dev/null +++ b/tests/projects/swig/java_c/xmake.lua @@ -0,0 +1,21 @@ +add_rules("mode.release", "mode.debug") + +-- make sure you config to an enviroment with jni.h +-- for example: xmake f -c -p android + +target("example") + set_kind('shared') + -- set moduletype to java + add_rules("swig.c", {moduletype = "java"}) + -- use swigflags to provider package name and output path of java files + add_files("src/example.i", {swigflags = { + "-package", + "com.example", + "-outdir", + "build/java/com/example/" + }}) + add_files("src/example.c") + before_build(function() + -- ensure output path exists before running swig + os.mkdir("build/java/com/example/") + end) |
