Commit 6d6f3b8a53ae8b67db8636cf7e7acc2765fade4d
1 parent
77062fae
initial android packaging support
Showing
1 changed file
with
10 additions
and
3 deletions
share/openbr/cmake/InstallDependencies.cmake
| @@ -3,7 +3,9 @@ set(BR_INSTALL_DEPENDENCIES OFF CACHE BOOL "Install runtime dependencies.") | @@ -3,7 +3,9 @@ set(BR_INSTALL_DEPENDENCIES OFF CACHE BOOL "Install runtime dependencies.") | ||
| 3 | # OpenCV Libs | 3 | # OpenCV Libs |
| 4 | function(install_opencv_library lib) | 4 | function(install_opencv_library lib) |
| 5 | if(${BR_INSTALL_DEPENDENCIES}) | 5 | if(${BR_INSTALL_DEPENDENCIES}) |
| 6 | - if(CMAKE_HOST_WIN32) | 6 | + if(ANDROID) |
| 7 | + # Do nothing assuming we are using OpenCV static libs | ||
| 8 | + elseif(CMAKE_HOST_WIN32) | ||
| 7 | if(${CMAKE_BUILD_TYPE} MATCHES Debug) | 9 | if(${CMAKE_BUILD_TYPE} MATCHES Debug) |
| 8 | set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") | 10 | set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") |
| 9 | endif() | 11 | endif() |
| @@ -35,7 +37,9 @@ endfunction() | @@ -35,7 +37,9 @@ endfunction() | ||
| 35 | # Qt Libs | 37 | # Qt Libs |
| 36 | function(install_qt_library lib) | 38 | function(install_qt_library lib) |
| 37 | if(${BR_INSTALL_DEPENDENCIES}) | 39 | if(${BR_INSTALL_DEPENDENCIES}) |
| 38 | - if(CMAKE_HOST_WIN32) | 40 | + if(ANDROID) |
| 41 | + install(FILES ${_qt5Core_install_prefix}/lib/libQt5${lib}.so DESTINATION lib) | ||
| 42 | + elseif(CMAKE_HOST_WIN32) | ||
| 39 | if(${CMAKE_BUILD_TYPE} MATCHES Debug) | 43 | if(${CMAKE_BUILD_TYPE} MATCHES Debug) |
| 40 | set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") | 44 | set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") |
| 41 | endif() | 45 | endif() |
| @@ -85,7 +89,10 @@ endfunction() | @@ -85,7 +89,10 @@ endfunction() | ||
| 85 | 89 | ||
| 86 | function(install_qt_platforms) | 90 | function(install_qt_platforms) |
| 87 | if(${BR_INSTALL_DEPENDENCIES}) | 91 | if(${BR_INSTALL_DEPENDENCIES}) |
| 88 | - if(CMAKE_HOST_WIN32) | 92 | + if(ANDROID) |
| 93 | + install(FILES ${_qt5Core_install_prefix}/plugins/platforms/android/libqtforandroid.so | ||
| 94 | + DESTINATION bin/platforms) | ||
| 95 | + elseif(CMAKE_HOST_WIN32) | ||
| 89 | install(FILES ${_qt5Core_install_prefix}/plugins/platforms/qwindows.dll | 96 | install(FILES ${_qt5Core_install_prefix}/plugins/platforms/qwindows.dll |
| 90 | DESTINATION bin/platforms) | 97 | DESTINATION bin/platforms) |
| 91 | elseif(CMAKE_HOST_APPLE) | 98 | elseif(CMAKE_HOST_APPLE) |