Skip to content

Commit 2984fa7

Browse files
author
Andrey Pavlenko
committed
adding OpenCV Manager
1 parent a3be73b commit 2984fa7

File tree

133 files changed

+34065
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+34065
-84
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ OCV_OPTION(BUILD_TESTS "Build accuracy & regression tests"
150150
OCV_OPTION(BUILD_WITH_DEBUG_INFO "Include debug info into debug libs (not MSCV only)" ON )
151151
OCV_OPTION(BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for staticaly linked OpenCV" ON IF MSVC )
152152
OCV_OPTION(BUILD_FAT_JAVA_LIB "Create fat java wrapper containing the whole OpenCV library" ON IF ANDROID AND NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX )
153+
OCV_OPTION(BUILD_ANDROID_SERVICE "TBD" OFF IF ANDROID )
154+
OCV_OPTION(BUILD_ANDROID_PACKAGE "TBD" OFF IF ANDROID )
153155

154156
# 3rd party libs
155157
OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 OR IOS OR APPLE )
@@ -416,6 +418,13 @@ if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES)
416418
add_subdirectory(samples)
417419
endif()
418420

421+
if(BUILD_ANDROID_SERVICE)
422+
add_subdirectory(android/service)
423+
endif()
424+
425+
if(BUILD_ANDROID_PACKAGE)
426+
add_subdirectory(android/package)
427+
endif()
419428

420429
# ----------------------------------------------------------------------------
421430
# Finalization: generate configuration-based files
@@ -520,6 +529,7 @@ if(ANDROID)
520529
endif()
521530
status(" android tool:" ANDROID_EXECUTABLE THEN "${ANDROID_EXECUTABLE} (${ANDROID_TOOLS_Pkg_Desc})" ELSE NO)
522531
status(" ant:" ANT_EXECUTABLE THEN "${ANT_EXECUTABLE} (ver ${ANT_VERSION})" ELSE NO)
532+
status(" Build service:" BUILD_ANDROID_SERVICE THEN YES ELSE NO)
523533
endif()
524534

525535
# ========================== GUI ==========================

android/package/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#tbd
2+
add_subdirectory(info_lib)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#tbd
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
LOCAL_PATH := $(call my-dir)
2+
include $(CLEAR_VARS)
3+
4+
LOCAL_MODULE_TAGS := optional
5+
6+
LOCAL_SRC_FILES := \
7+
src/info.c
8+
9+
LOCAL_C_INCLUDES := \
10+
$(LOCAL_PATH)/include \
11+
$(TOP)/frameworks/base/core/jni
12+
13+
LOCAL_PRELINK_MODULE := false
14+
15+
LOCAL_MODULE := libopencvinfo
16+
17+
include $(BUILD_SHARED_LIBRARY)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
APP_ABI := armeabi-v7a x86
2+
APP_PLATFORM := android-8
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Function return list of shared libs seporated with ";" symbol
2+
// in load order
3+
const char* GetLibraryList();

android/package/info_lib/jni/include/info_jni.h

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include "info.h"
2+
#include <jni.h>
3+
4+
#ifndef LIB_STRING
5+
#define LIB_STRING "libtbb.so;libopencv_java.so"
6+
#endif
7+
8+
const char* GetLibraryList()
9+
{
10+
return LIB_STRING;
11+
}
12+
13+
JNIEXPORT jstring JNICALL Java_org_opencv_android_StaticHelper_getLibraryList(JNIEnv* jenv, jclass clazz)
14+
{
15+
jstring result = (*jenv)->NewStringUTF(jenv, LIB_STRING);
16+
17+
return result;
18+
}

android/refman.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
############################
2+
OpenCV4Android Reference
3+
############################
4+
5+
.. toctree::
6+
:maxdepth: 2
7+
8+
service/doc/index.rst
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
cd `dirname $0`/..
3+
4+
mkdir -p build_service
5+
cd build_service
6+
7+
cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake -DANDROID_USE_STLPORT=ON -DBUILD_ANDROID_SERVICE=ON -DANDROID_SOURCE_TREE=~/Projects/AndroidSource/2.2.2/ $@ ../..
8+

0 commit comments

Comments
 (0)