diff options
| author | ruki <[email protected]> | 2025-12-17 00:31:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-17 00:31:54 +0800 |
| commit | e9cc5c5f4627b2df658310371e43557ae00c2e1e (patch) | |
| tree | c8978321049be753f1a6c7122d67f75bf300b1bc /xmake/rules/platform/android/load.lua | |
| parent | d1485fa867ebb3b661a16ec043f33537a7f9f0cd (diff) | |
add conf to disable native app glue
Diffstat (limited to 'xmake/rules/platform/android/load.lua')
| -rw-r--r-- | xmake/rules/platform/android/load.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/xmake/rules/platform/android/load.lua b/xmake/rules/platform/android/load.lua index 3e49d9533..54defbbcd 100644 --- a/xmake/rules/platform/android/load.lua +++ b/xmake/rules/platform/android/load.lua @@ -37,8 +37,15 @@ function main(target) target:set("kind", "shared") -- add glue file to target - local native_app_glue_file = path.join(ndk_root, "sources", "android", "native_app_glue", "android_native_app_glue.c") - local native_app_glue_dir = path.directory(native_app_glue_file) - target:add("files", native_app_glue_file) - target:add("includedirs", native_app_glue_dir) + local extraconf = target:extraconf("rules", "android.native_app") + local native_app_glue = true + if extraconf and extraconf.native_app_glue ~= nil then + native_app_glue = extraconf.native_app_glue + end + if native_app_glue then + local native_app_glue_file = path.join(ndk_root, "sources", "android", "native_app_glue", "android_native_app_glue.c") + local native_app_glue_dir = path.directory(native_app_glue_file) + target:add("files", native_app_glue_file) + target:add("includedirs", native_app_glue_dir) + end end |
