File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,34 @@ CythonRecipe inherits from it (to avoid code duplication).
307307Using an NDKRecipe
308308------------------
309309
310+ If you are writing a recipe not for a Python module but for something
311+ that would normall go in the JNI dir of an Android project (i.e. it
312+ has an ``Application.mk `` and ``Android.mk `` that the Android build
313+ system can use), you can use an NDKRecipe to automatically set it
314+ up. The NDKRecipe overrides the normal ``get_build_dir `` method to
315+ place things in the Android project.
316+
317+ .. warning :: The NDKRecipe does *not* currently actually call
318+ ndk-build, you must add this call (for your module) by
319+ manually making a build_arch method. This may be fixed
320+ later.
321+
322+ For instance, the following recipe is all that's necessary to place
323+ SDL2_ttf in the jni dir. This is built later by the SDL2 recipe, which
324+ calls ndk-build with this as a dependency::
325+
326+ class LibSDL2TTF(NDKRecipe):
327+ version = '2.0.12'
328+ url = 'https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-{version}.tar.gz'
329+ dir_name = 'SDL2_ttf'
330+
331+ recipe = LibSDL2TTF()
332+
333+ The dir_name argument is a new class attribute that tells the recipe
334+ what the jni dir folder name should be. If it is omitted, the recipe
335+ name is used. Be careful here, sometimes the folder name is important,
336+ especially if this folder is a dependency of something else.
337+
310338.. _recipe_class :
311339
312340The ``Recipe `` class
You can’t perform that action at this time.
0 commit comments