Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed protobuf cpp #1021

Merged
merged 1 commit into from
Mar 25, 2017
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
7 changes: 6 additions & 1 deletion pythonforandroid/recipes/protobuf_cpp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pythonforandroid.recipe import PythonRecipe
from pythonforandroid.logger import shprint
from pythonforandroid.util import current_directory
from pythonforandroid.util import current_directory, shutil
from pythonforandroid.util import ensure_dir
from os.path import exists, join, dirname
import sh
from multiprocessing import cpu_count
Expand Down Expand Up @@ -37,6 +38,10 @@ def build_arch(self, arch):
shprint(sh.make, 'libprotobuf.la', '-j'+str(cpu_count()), _env=env)
shprint(sh.cp, '.libs/libprotobuf.a', join(self.ctx.get_libs_dir(arch.arch), 'libprotobuf.a'))

# Copy stl library
shutil.copyfile(self.ctx.ndk_dir + '/sources/cxx-stl/gnu-libstdc++/' + self.ctx.toolchain_version + '/libs/' + arch.arch + '/libgnustl_shared.so',
join(self.ctx.get_libs_dir(arch.arch), 'libgnustl_shared.so'))

# Build python bindings and _message.so
with current_directory(join(self.get_build_dir(arch.arch), 'python')):
hostpython = sh.Command(self.hostpython_location)
Expand Down