Those patches fixes the build for android on my machine.
From 6c3a1d0a1cc226e2b97a1fa0da6028047783fce4 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Thu, 17 Dec 2015 17:04:52 -0200
Subject: [PATCH 1/4] Add the correct target on the Android build

The android build could be the Desktop and the Mobile app,
we cannot force it to be the mobile.

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 983d48b..989e861 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -320,7 +320,7 @@ if(ANDROID)
 	# Android template directory
 	include(${QT_ANDROID_CMAKE})
 	set(ANDROID_PACKAGE_SOURCE_DIR, ${CMAKE_BINARY_DIR}/android-mobile)
-	add_qt_android_apk(subsurface-mobile.apk subsurface-mobile
+	add_qt_android_apk(subsurface-mobile.apk ${SUBSURFACE_TARGET}
 		PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android-mobile
 	)
 elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-- 
2.6.4

From 435c430ff9701591e6be515dafa99041cf01cf1d Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Thu, 17 Dec 2015 17:14:13 -0200
Subject: [PATCH 2/4] Fix CMake to not add Facebook on Android

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 CMakeLists.txt                                  |  6 -----
 desktop-widgets/plugins/facebook/CMakeLists.txt | 33 ++++++++++++++-----------
 2 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 989e861..7bf6383 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,7 +129,6 @@ elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
 endif()
 
 if(ANDROID)
-	set(FBSUPPORT OFF)
 	set(NO_PRINTING ON)
 	list(APPEND QT_EXTRA_COMPONENTS AndroidExtras)
 	list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras)
@@ -208,11 +207,6 @@ if (${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
 	add_subdirectory(desktop-widgets)
 endif()
 
-if(FBSUPPORT)
-	add_definitions(-DFBSUPPORT)
-	set(FACEBOOK_INTEGRATION facebook_integration)
-endif()
-
 # create the executables
 if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
 	set(SUBSURFACE_TARGET subsurface-mobile)
diff --git a/desktop-widgets/plugins/facebook/CMakeLists.txt b/desktop-widgets/plugins/facebook/CMakeLists.txt
index eb0da75..592700a 100644
--- a/desktop-widgets/plugins/facebook/CMakeLists.txt
+++ b/desktop-widgets/plugins/facebook/CMakeLists.txt
@@ -1,17 +1,22 @@
+if (ANDROID)
+	set(FACEBOOK_INTEGRATION "")
+elseif (${FBSUPPORT})
+	add_definitions(-DFBSUPPORT)
+	set(FACEBOOK_INTEGRATION facebook_integration)
+	include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
+	set(FACEBOOK_PLUGIN_UI
+		facebookconnectwidget.ui
+		socialnetworksdialog.ui
+	)
 
-set(FACEBOOK_PLUGIN_UI
-  facebookconnectwidget.ui
-  socialnetworksdialog.ui
-)
+	set(FACEBOOK_PLUGIN_SRCS
+		facebook_integration.cpp
+		facebookconnectwidget.cpp
+	)
 
-set(FACEBOOK_PLUGIN_SRCS
-  facebook_integration.cpp
-  facebookconnectwidget.cpp
-)
-
-qt5_wrap_ui(FACEBOOK_PLUGIN_UI_SRCS ${FACEBOOK_PLUGIN_UI})
-add_library(facebook_integration STATIC ${FACEBOOK_PLUGIN_SRCS} ${FACEBOOK_PLUGIN_UI_SRCS})
-target_link_libraries(facebook_integration ${QT_LIBRARIES})
-add_dependencies(facebook_integration subsurface_corelib)
\ No newline at end of file
+	qt5_wrap_ui(FACEBOOK_PLUGIN_UI_SRCS ${FACEBOOK_PLUGIN_UI})
+	add_library(facebook_integration STATIC ${FACEBOOK_PLUGIN_SRCS} ${FACEBOOK_PLUGIN_UI_SRCS})
+	target_link_libraries(facebook_integration ${QT_LIBRARIES})
+	add_dependencies(facebook_integration subsurface_corelib)
+endif()
-- 
2.6.4

From 19a08e9d22503a3108b7e262e2f98de5d6efe504 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Thu, 17 Dec 2015 17:14:35 -0200
Subject: [PATCH 3/4] Use newer libraries

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 packaging/android/build.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index a7771bc..f59cf31 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -19,11 +19,11 @@ fi
 
 # Which versions are we building against?
 SQLITE_VERSION=3081002
-LIBXML2_VERSION=2.9.2
+LIBXML2_VERSION=2.9.3
 LIBXSLT_VERSION=1.1.28
 LIBZIP_VERSION=1.0.1
 LIBZIP_VERSION=0.11.2
-LIBGIT2_VERSION=0.23.0
+LIBGIT2_VERSION=0.23.4
 LIBSSH2_VERSION=1.6.0
 LIBUSB_VERSION=1.0.19
 OPENSSL_VERSION=1.0.1p
-- 
2.6.4

From 0a0187eb928d931e0a213577ed4dfae9ccb6fea2 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Thu, 17 Dec 2015 17:15:32 -0200
Subject: [PATCH 4/4] Do not try to compile FTDI_EPROM

this was requiring libconfuse and we don't need it.

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 packaging/android/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index f59cf31..62d001c 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -237,7 +237,7 @@ fi
 if [ ! -e $PKG_CONFIG_LIBDIR/libftdi1.pc ] && [ $PLATFORM != Darwin ] ; then
 	mkdir -p libftdi1-build-$ARCH
 	pushd libftdi1-build-$ARCH
-	cmake ../libftdi1-${LIBFTDI_VERSION} -DCMAKE_C_COMPILER=${CC} -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} -DSTATICLIBS=ON -DPYTHON_BINDINGS=OFF -DDOCUMENTATION=OFF -DFTDIPP=OFF -DBUILD_TESTS=OFF -DEXAMPLES=OFF
+	cmake ../libftdi1-${LIBFTDI_VERSION} -DCMAKE_C_COMPILER=${CC} -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} -DSTATICLIBS=ON -DPYTHON_BINDINGS=OFF -DDOCUMENTATION=OFF -DFTDIPP=OFF -DBUILD_TESTS=OFF -DEXAMPLES=OFF -DFTDI_EEPROM=OFF
 	make
 	make install
 	popd
-- 
2.6.4

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to