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 | 3 | # OpenCV Libs |
| 4 | 4 | function(install_opencv_library lib) |
| 5 | 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 | 9 | if(${CMAKE_BUILD_TYPE} MATCHES Debug) |
| 8 | 10 | set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") |
| 9 | 11 | endif() |
| ... | ... | @@ -35,7 +37,9 @@ endfunction() |
| 35 | 37 | # Qt Libs |
| 36 | 38 | function(install_qt_library lib) |
| 37 | 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 | 43 | if(${CMAKE_BUILD_TYPE} MATCHES Debug) |
| 40 | 44 | set(BR_INSTALL_DEPENDENCIES_SUFFIX "d") |
| 41 | 45 | endif() |
| ... | ... | @@ -85,7 +89,10 @@ endfunction() |
| 85 | 89 | |
| 86 | 90 | function(install_qt_platforms) |
| 87 | 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 | 96 | install(FILES ${_qt5Core_install_prefix}/plugins/platforms/qwindows.dll |
| 90 | 97 | DESTINATION bin/platforms) |
| 91 | 98 | elseif(CMAKE_HOST_APPLE) | ... | ... |