From 7f05ee64d9b4ae43a86c15e774fcaf3396ad2eee Mon Sep 17 00:00:00 2001 From: Comma Device Date: Wed, 20 Nov 2019 20:06:15 +0000 Subject: [PATCH] fix apks --- SConscript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SConscript b/SConscript index ec629f8..1cdacb7 100644 --- a/SConscript +++ b/SConscript @@ -1,4 +1,4 @@ -Import('env') +Import('env', 'zmq') # TODO: remove src-prefix and cereal from command string. can we set working directory? env.Command(["gen/c/include/c++.capnp.h", "gen/c/include/java.capnp.h"], [], "mkdir -p cereal/gen/c/include && touch $TARGETS") @@ -32,8 +32,9 @@ messaging_deps = [ messaging_lib = env.Library('messaging', messaging_deps) -# note, this rebuilds the deps shared -env.SharedLibrary('messaging_shared', messaging_deps) +# note, this rebuilds the deps shared, zmq is statically linked to make APK happy +messaging_shared_lib = env.SharedLibrary('messaging_shared', messaging_deps, LIBS=[zmq, 'm', 'stdc++', 'gnustl_shared']) +env.Command(['messaging/messaging.so'], [messaging_shared_lib], "chmod 777 $SOURCES && ln -sf `realpath $SOURCES` $TARGET") env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=['messaging', 'zmq'])