From 6d6f3b8a53ae8b67db8636cf7e7acc2765fade4d Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Thu, 12 Nov 2015 11:37:17 -0500 Subject: [PATCH] initial android packaging support --- share/openbr/cmake/InstallDependencies.cmake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/share/openbr/cmake/InstallDependencies.cmake b/share/openbr/cmake/InstallDependencies.cmake index 8828b16..e6c0d8b 100644 --- a/share/openbr/cmake/InstallDependencies.cmake +++ b/share/openbr/cmake/InstallDependencies.cmake @@ -3,7 +3,9 @@ set(BR_INSTALL_DEPENDENCIES OFF CACHE BOOL "Install runtime dependencies.") # OpenCV Libs function(install_opencv_library lib) if(${BR_INSTALL_DEPENDENCIES}) - if(CMAKE_HOST_WIN32) + if(ANDROID) + # Do nothing assuming we are using OpenCV static libs + elseif(CMAKE_HOST_WIN32) if(${CMAKE_BUILD_TYPE} MATCHES Debug) set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") endif() @@ -35,7 +37,9 @@ endfunction() # Qt Libs function(install_qt_library lib) if(${BR_INSTALL_DEPENDENCIES}) - if(CMAKE_HOST_WIN32) + if(ANDROID) + install(FILES ${_qt5Core_install_prefix}/lib/libQt5${lib}.so DESTINATION lib) + elseif(CMAKE_HOST_WIN32) if(${CMAKE_BUILD_TYPE} MATCHES Debug) set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") endif() @@ -85,7 +89,10 @@ endfunction() function(install_qt_platforms) if(${BR_INSTALL_DEPENDENCIES}) - if(CMAKE_HOST_WIN32) + if(ANDROID) + install(FILES ${_qt5Core_install_prefix}/plugins/platforms/android/libqtforandroid.so + DESTINATION bin/platforms) + elseif(CMAKE_HOST_WIN32) install(FILES ${_qt5Core_install_prefix}/plugins/platforms/qwindows.dll DESTINATION bin/platforms) elseif(CMAKE_HOST_APPLE) -- libgit2 0.21.4