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 | |
| parent | d1485fa867ebb3b661a16ec043f33537a7f9f0cd (diff) | |
add conf to disable native app glue
| -rw-r--r-- | xmake/rules/platform/android/load.lua | 15 | ||||
| -rw-r--r-- | xmake/rules/platform/android/xmake.lua | 1 |
2 files changed, 12 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 diff --git a/xmake/rules/platform/android/xmake.lua b/xmake/rules/platform/android/xmake.lua index 0c58d7d09..9208b8932 100644 --- a/xmake/rules/platform/android/xmake.lua +++ b/xmake/rules/platform/android/xmake.lua @@ -31,6 +31,7 @@ -- keystore = "android/debug.jks", -- keystore_pass = "123456", -- package_name = "com.raylib.demo", +-- native_app_glue = false, -- logcat_filters = {"raydemo_android", "raylib"} -- }) -- @endcode |
