-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Is your feature request related to a problem? Please describe.
My application is able to dynamically load dependencies using dlopen
+ dladdr
.
I have modeled every library using prefab json files.
But I don't know of any way, other then explicitly do target_link_libraries
to add a dynamic dependency to the .apk
.
Describe the solution you'd like
I have 2 suggestions:
- add every dependency of the target to the
.apk
.
Doingadd_dependencies(myexecutable dynamic_dependency)
, should adddynamic_dependency
to the.apk
as well - add some function to the android cmake toolchain script that marks a target to be added to the
.apk
:
add_target_to_apk(dynamic_dependency)
Describe alternatives you've considered
Right now, I'm simply doing
target_link_libraries(mygame PRIVATE dynamic_dependency)
This type of dependency is honored by android's cmake support,
but should not be necessary.
Additional context
I have encountered this issue while creating a prefab aar for SDL_image.
SDL_image provides decoders for various image formats.
Because not every applications needs every decoder, these are dynamically loaded.
Dynamically loading also reduces the file size of an .apk
.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status