From 7c440b339fef87c1ef92727514f0a566ea246101 Mon Sep 17 00:00:00 2001 From: Gareth Fare Date: Mon, 16 Oct 2023 17:48:50 +0100 Subject: [PATCH] Small fix on soname defining on ldflags for Android examples. (#3184) * Add linker options to add SONAME to the linked target so Android apps can dynamically resolve the library location from known locations (as opposed to a hard coded location often residing on the host cross compiling filesystem. linked issue is, https://github.com/bkaradzic/bgfx/pull/2176 * Kepp orginal code for linkoptions in the previous configuration block and add the additional linker flags for each Debug/Release configuration. * Add comma character to EOL to match orginal code. --- scripts/genie.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/genie.lua b/scripts/genie.lua index 3ed8a94e7..114a97e14 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -374,6 +374,16 @@ function exampleProjectDefaults() "GLESv2", } + configuration { "android*", "Debug" } + linkoptions { + "-Wl,-soname,lib" .. project().name .. "Debug.so" + } + + configuration { "android*", "Release" } + linkoptions { + "-Wl,-soname,lib" .. project().name .. "Release.so" + } + configuration { "wasm*" } kind "ConsoleApp"