From e7642f66d9226bd28c63b7d2c5e76b79994b3952 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Mon, 25 Jul 2011 13:17:11 +0000 Subject: [PATCH] Fixed install terget for Android examples --- OpenCVAndroidProject.cmake | 6 +++++- samples/android/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenCVAndroidProject.cmake b/OpenCVAndroidProject.cmake index b1e13e0301..222439ef41 100644 --- a/OpenCVAndroidProject.cmake +++ b/OpenCVAndroidProject.cmake @@ -132,5 +132,9 @@ macro(add_android_project _target _path) DEPENDS "${build_path}/bin/${_target}-debug.apk" DEPENDS "${CMAKE_BINARY_DIR}/bin/${_target}.apk" ) + + if("${ARGN}" STREQUAL "INSTALL" AND INSTALL_ANDROID_EXAMPLES) + install(FILES "${CMAKE_BINARY_DIR}/bin/${_target}.apk" DESTINATION "bin" COMPONENT main) + endif() endif() -endmacro() \ No newline at end of file +endmacro() diff --git a/samples/android/CMakeLists.txt b/samples/android/CMakeLists.txt index d0a44144dd..28166b7d5e 100644 --- a/samples/android/CMakeLists.txt +++ b/samples/android/CMakeLists.txt @@ -31,7 +31,7 @@ if (BUILD_ANDROID_EXAMPLES) foreach(sample ${android_samples}) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${sample}/AndroidManifest.xml") - add_android_project("${sample}" "${CMAKE_CURRENT_SOURCE_DIR}/${sample}") + add_android_project("${sample}" "${CMAKE_CURRENT_SOURCE_DIR}/${sample}" INSTALL) endif() endforeach()