Replies: 2 comments 3 replies
-
Is this a general issue such that the android platform only really makes sense to produce shared libraries like this? Are executables still expected to be named "foo" or "libfoo.so" (guessing the former)?
Not entirely sure what you're trying to do here. Is it not possible to build the app inside meson? If you need some common code exported to another build process, usually you'd do that by producing a static library and having the other build system pick up the static library as a dependency. So you'd use |
Beta Was this translation helpful? Give feedback.
-
Something additional I've noticed with meson is, that it isn't seemingly possible to a parallel setup for multiple architectures. As android needs shared libraries for x86, x86_64, aarch64 and armv7a (mips32el, riscv64) I was planning to run This fails with Would you accept some sort of subprojects locking implementation or is it just not possible to configure in parallel? |
Beta Was this translation helpful? Give feedback.
-
For the android backend for GTK, we'd like to have a builder application/script that is ideally capable of producing an apk file when pointing it at meson project utilizing gtk.
As android applications are somewhat special regarding initialization (fork of pre-warmed JVM), we don't need an executable but a shared library providing the application entry point.
Specifically the current initialization routine looks like the following:
Java_org_gtk_android_GlueLibraryContext_runApplication
, which initializes glib/gtk and starts a new thread in whichmain
will get called.This means right now, if I want to build a gtk application for android, I need to change the meson target from
executable
toshared_library/shared_module
. This is something I'd rather want to avoid and instead rely solely on a cross file / meson parameters.Right now, this isn't really possible (best I could to is probably add -shared -fPIC to compiler/linker flags), so I'm looking for suggestions on how best to implement such behavior. Alternatively I'm not yet really set on any specific procedure, so if someone has a better idea than the current one feel free to tell me.
[1]: I have thought about building the glue code as an object file (.o) during the compilation of gtk and then just have CMake link that file into a shared object. But its seemingly not possible to get meson to produce object files (.o) as output?
Beta Was this translation helpful? Give feedback.
All reactions