Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
fc085d9d
Commit
fc085d9d
authored
Oct 31, 2012
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
info library for OpenCV added.
parent
b5ecb1d3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
1 deletion
+76
-1
CMakeLists.txt
CMakeLists.txt
+4
-0
CMakeLists.txt
android/libinfo/CMakeLists.txt
+40
-0
info.c
android/libinfo/info.c
+31
-0
OpenCVEngine.cpp
android/service/engine/jni/BinderComponent/OpenCVEngine.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
fc085d9d
...
...
@@ -467,6 +467,10 @@ if(BUILD_ANDROID_PACKAGE)
add_subdirectory
(
android/package
)
endif
()
if
(
ANDROID AND NOT BUILD_ANDROID_SERVICE AND NOT BUILD_ANDROID_PACKAGE AND NOT BUILD_CAMERA_WRAPER
)
add_subdirectory
(
android/libinfo
)
endif
()
# ----------------------------------------------------------------------------
# Finalization: generate configuration-based files
# ----------------------------------------------------------------------------
...
...
android/libinfo/CMakeLists.txt
0 → 100644
View file @
fc085d9d
project
(
libopencv_info
)
if
(
NOT ANDROID_PACKAGE_RELEASE
)
set
(
ANDROID_PACKAGE_RELEASE 1
)
endif
()
if
(
NOT ANDROID_PACKAGE_PLATFORM
)
if
(
ARMEABI_V7A
)
if
(
NEON
)
set
(
ANDROID_PACKAGE_PLATFORM armv7a_neon
)
else
()
set
(
ANDROID_PACKAGE_PLATFORM armv7a
)
endif
()
elseif
(
ARMEABI_V6
)
set
(
ANDROID_PACKAGE_PLATFORM armv6
)
elseif
(
ARMEABI
)
set
(
ANDROID_PACKAGE_PLATFORM armv5
)
elseif
(
X86
)
set
(
ANDROID_PACKAGE_PLATFORM x86
)
elseif
(
MIPS
)
set
(
ANDROID_PACKAGE_PLATFORM mips
)
else
()
message
(
ERROR
"Can not automatically determine the value for ANDROID_PACKAGE_PLATFORM"
)
endif
()
endif
()
add_definitions
(
-DANDROID_PACKAGE_RELEASE=
${
ANDROID_PACKAGE_RELEASE
}
-DANDROID_PACKAGE_PLATFORM=
"
${
ANDROID_PACKAGE_PLATFORM
}
"
)
include_directories
(
jni/BinderComponent jni/include
"
${
OpenCV_SOURCE_DIR
}
/modules/core/include"
)
add_library
(
opencv_info SHARED info.c
)
set_target_properties
(
${
the_module
}
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
RUNTIME_OUTPUT_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
INSTALL_NAME_DIR lib
)
get_filename_component
(
lib_name
"opencv_info"
NAME
)
install
(
FILES
"
${
LIBRARY_OUTPUT_PATH
}
/
${
lib_name
}
"
DESTINATION
${
OPENCV_LIB_INSTALL_PATH
}
COMPONENT main
)
\ No newline at end of file
android/libinfo/info.c
0 → 100644
View file @
fc085d9d
#include "opencv2/core/version.hpp"
#include <jni.h>
const
char
*
GetPackageName
(
void
);
const
char
*
GetRevision
(
void
);
const
char
*
GetLibraryList
(
void
);
JNIEXPORT
jstring
JNICALL
Java_org_opencv_android_StaticHelper_getLibraryList
(
JNIEnv
*
,
jclass
);
#define PACKAGE_NAME "org.opencv.lib_v" CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) "_" ANDROID_PACKAGE_PLATFORM
#define PACKAGE_REVISION CVAUX_STR(CV_SUBMINOR_VERSION) CVAUX_STR(ANDROID_PACKAGE_RELEASE)
const
char
*
GetPackageName
(
void
)
{
return
PACKAGE_NAME
;
}
const
char
*
GetRevision
(
void
)
{
return
PACKAGE_REVISION
;
}
const
char
*
GetLibraryList
(
void
)
{
return
""
;
}
JNIEXPORT
jstring
JNICALL
Java_org_opencv_android_StaticHelper_getLibraryList
(
JNIEnv
*
env
,
jclass
clazz
)
{
(
void
)
clazz
;
return
(
*
env
)
->
NewStringUTF
(
env
,
GetLibraryList
());
}
android/service/engine/jni/BinderComponent/OpenCVEngine.cpp
View file @
fc085d9d
...
...
@@ -130,7 +130,7 @@ android::String16 OpenCVEngine::GetLibraryList(android::String16 version)
LOGD
(
"Trying to load info library
\"
%s
\"
"
,
tmp
.
c_str
());
void
*
handle
;
char
*
(
*
info_func
)();
c
onst
c
har
*
(
*
info_func
)();
handle
=
dlopen
(
tmp
.
c_str
(),
RTLD_LAZY
);
if
(
handle
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment