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
39dab5e0
Commit
39dab5e0
authored
Jul 15, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Headers are included into opencv_java build
parent
4deec6f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
package.sh
android/scripts/package.sh
+17
-19
CMakeLists.txt
modules/java/CMakeLists.txt
+3
-2
No files found.
android/scripts/package.sh
View file @
39dab5e0
...
...
@@ -10,19 +10,18 @@ cd package
PRG_DIR
=
`
pwd
`
mkdir
opencv
# neon-enabled build
cd
$PRG_DIR
mkdir
build-neon
cd
build-neon
#
cd $PRG_DIR
#
mkdir build-neon
#
cd build-neon
cmake
-C
"
$ANDROID_DIR
/CMakeCache.android.initial.cmake"
-DARM_TARGET
=
"armeabi-v7a with NEON"
-DBUILD_DOCS
=
OFF
-DBUILD_TESTS
=
OFF
-DBUILD_EXAMPLES
=
OFF
-DBUILD_ANDROID_EXAMPLES
=
OFF
-DCMAKE_TOOLCHAIN_FILE
=
"
$ANDROID_DIR
/android.toolchain.cmake"
-DCMAKE_INSTALL_PREFIX
=
"
$PRG_DIR
/opencv"
"
$ANDROID_DIR
/.."
||
exit
1
make
-j8
install
/strip
||
exit
1
#
cmake -C "$ANDROID_DIR/CMakeCache.android.initial.cmake" -DARM_TARGET="armeabi-v7a with NEON" -DBUILD_DOCS=OFF -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_ANDROID_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="$ANDROID_DIR/android.toolchain.cmake" -DCMAKE_INSTALL_PREFIX="$PRG_DIR/opencv" "$ANDROID_DIR/.." || exit 1
#
make -j8 install/strip || exit 1
cd
"
$PRG_DIR
/opencv"
rm
-rf
doc include src .classpath .project AndroidManifest.xml default.properties share/OpenCV/haarcascades share/OpenCV/lbpcascades share/OpenCV/
*
.cmake share/OpenCV/OpenCV.mk
mv
libs/armeabi-v7a libs/armeabi-v7a-neon
mv
share/OpenCV/3rdparty/libs/armeabi-v7a share/OpenCV/3rdparty/libs/armeabi-v7a-neon
#
cd "$PRG_DIR/opencv"
#
rm -rf doc include src .classpath .project AndroidManifest.xml default.properties share/OpenCV/haarcascades share/OpenCV/lbpcascades share/OpenCV/*.cmake share/OpenCV/OpenCV.mk
#
mv libs/armeabi-v7a libs/armeabi-v7a-neon
#
mv share/OpenCV/3rdparty/libs/armeabi-v7a share/OpenCV/3rdparty/libs/armeabi-v7a-neon
# armeabi-v7a build
...
...
@@ -54,8 +53,8 @@ cp "$ANDROID_DIR/../README" opencv/
# get opencv version
CV_VERSION
=
`
grep
-o
"[0-9]
\+\.
[0-9]
\+\.
[0-9]
\+
"
opencv/share/OpenCV/OpenCVConfig-version.cmake
`
mv
opencv opencv
$CV_VERSION
OPENCV_NAME
=
OpenCV-
$CV_VERSION
mv
opencv
$OPENCV_NAME
#samples
cp
-r
"
$ANDROID_DIR
/../samples/android"
"
$PRG_DIR
/samples"
...
...
@@ -72,7 +71,7 @@ do
if
[
$HAS_REFERENCE
=
1
]
then
echo
-n
>
"
$dir
/default.properties"
android update project
--name
"
$dir
"
--target
"android-8"
--library
"../../
opencv
$CV_VERSION
"
--path
"
$dir
"
android update project
--name
"
$dir
"
--target
"android-8"
--library
"../../
$OPENCV_NAME
"
--path
"
$dir
"
#echo 'android update project --name "$dir" --target "android-8" --library "../opencv$CV_VERSION" --path "$dir"'
fi
else
...
...
@@ -89,8 +88,6 @@ cd "$PRG_DIR/samples"
svn status
--no-ignore
|
grep
^I |
cut
-c9-
| xargs
-d
\\
n
rm
-rf
#remove unversioned files/folders
svn status |
grep
^
\?
|
cut
-c9-
| xargs
-d
\\
n
rm
-rf
#remove unneded CMakeLists.txt
rm
CMakeLists.txt
#generate "gen" folders to eliminate eclipse warnings
...
...
@@ -106,11 +103,12 @@ done
#generate folders "gen" and "res" for opencv (dummy eclipse stiff)
cd
$PRG_DIR
mkdir
"
opencv
$CV_VERSION
/gen"
mkdir
"
opencv
$CV_VERSION
/res"
mkdir
"
$OPENCV_NAME
/gen"
mkdir
"
$OPENCV_NAME
/res"
# pack all files
cd
$PRG_DIR
tar
cjpf opencv
$CV_VERSION
.tar.bz2
--exclude-vcs
opencv
$CV_VERSION
samples
||
exit
-1
PRG_NAME
=
OpenCV-
$CV_VERSION
-tp-android-bin
.tar.bz2
tar
cjpf
$PRG_NAME
--exclude-vcs
$OPENCV_NAME
samples
||
exit
-1
echo
echo
"Package
opencv
$CV_VERSION
.tar.bz2
is successfully created"
echo
"Package
$PRG_NAME
is successfully created"
modules/java/CMakeLists.txt
View file @
39dab5e0
...
...
@@ -43,7 +43,7 @@ foreach(module ${OPENCV_JAVA_MODULES})
endforeach
()
set
(
target opencv_java
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/cpp"
)
SET
(
generated_cpp_sources
""
)
SET
(
generated_java_sources
""
)
...
...
@@ -63,6 +63,7 @@ foreach(module ${OPENCV_EXTRA_JAVA_MODULES})
endforeach
()
FILE
(
GLOB handwrittren_cpp_sources
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/cpp/*.cpp"
)
FILE
(
GLOB handwrittren_h_sources
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/cpp/*.h*"
)
add_library
(
${
target
}
SHARED
${
handwrittren_cpp_sources
}
${
generated_cpp_sources
}
)
target_link_libraries
(
${
target
}
${
dependent_libs
}
${
dependent_extra_libs
}
${
OPENCV_LINKER_LIBS
}
)
...
...
@@ -117,7 +118,7 @@ IF(ANDROID)
endif
()
endforeach
()
foreach
(
jni_file
${
handwrittren_cpp_sources
}
${
generated_cpp_sources
}
)
foreach
(
jni_file
${
handwrittren_cpp_sources
}
${
handwrittren_h_sources
}
${
generated_cpp_sources
}
)
get_filename_component
(
jni_file_name
"
${
jni_file
}
"
NAME
)
add_custom_command
(
TARGET
${
api_target
}
...
...
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