Skip to content

Commit 6e33e5c

Browse files
committed
Added lib copying instructions in recipes doc
1 parent 2f61593 commit 6e33e5c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/source/recipes.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,23 @@ This code also manually takes care to patch only once. You can use the
139139
same strategy yourself, though a more generic solution may be provided
140140
in the future.
141141

142+
Installing libs
143+
~~~~~~~~~~~~~~~
144+
145+
Some recipes generate .so files that must be manually copied into the
146+
android project. You can use code like the following to accomplish
147+
this, copying to the correct lib cache dir::
148+
149+
def build_arch(self, arch):
150+
do_the_build() # e.g. running ./configure and make
151+
152+
import shutil
153+
shutil.copyfile('a_generated_binary.so',
154+
self.ctx.get_libs_dir(arch.arch))
155+
156+
Any libs copied to this dir will automatically be included in the
157+
appropriate libs dir of the generated android project.
158+
142159
Compiling for the Android architecture
143160
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144161

0 commit comments

Comments
 (0)