Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pythonforandroid/recipes/sdl2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from os.path import exists, join

from pythonforandroid.recipe import BootstrapNDKRecipe
from pythonforandroid.toolchain import current_directory, shprint
import sh
Expand All @@ -18,6 +20,15 @@ def get_recipe_env(self, arch=None, with_flags_in_cc=True, with_python=True):
env['APP_ALLOW_MISSING_DEPS'] = 'true'
return env

def should_build(self, arch):
libdir = join(
self.get_build_dir(arch.arch),
'../..',
'libs', arch.arch
)
libs = ['libhidapi.so', 'libmain.so', 'libSDL2.so', 'libSDL2_image.so', 'libSDL2_mixer.so', 'libSDL2_ttf.so']
return not all(exists(join(libdir, x)) for x in libs)

def build_arch(self, arch):
env = self.get_recipe_env(arch)

Expand Down