Auto expand of OpenCV version for Android Library prject and some documentation pages added.
This commit is contained in:
parent
705b4724cb
commit
9a76573172
@ -323,7 +323,7 @@ We recommend the approach based on Eclipse :abbr:`CDT(C/C++ Development Tooling)
|
|||||||
:alt: Eclipse About
|
:alt: Eclipse About
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
.. important:: OpenCV for Android 2.4.2 package contains sample projects pre-configured CDT Builders. For your own projects follow the steps below.
|
.. important:: OpenCV for Android package since version 2.4.2 contains sample projects pre-configured CDT Builders. For your own projects follow the steps below.
|
||||||
|
|
||||||
#. Define the ``NDKROOT`` environment variable containing the path to Android NDK in your system (e.g. ``"X:\\Apps\\android-ndk-r8"`` or ``"/opt/android-ndk-r8"``).
|
#. Define the ``NDKROOT`` environment variable containing the path to Android NDK in your system (e.g. ``"X:\\Apps\\android-ndk-r8"`` or ``"/opt/android-ndk-r8"``).
|
||||||
**On Windows** an environment variable can be set via :guilabel:`My Computer -> Properties -> Advanced -> Environment variables` and restarting Eclipse.
|
**On Windows** an environment variable can be set via :guilabel:`My Computer -> Properties -> Advanced -> Environment variables` and restarting Eclipse.
|
||||||
|
@ -16,7 +16,7 @@ Installation by using the pre-built libraries
|
|||||||
|
|
||||||
1. Open up a web browser and go to: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/
|
1. Open up a web browser and go to: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/
|
||||||
|
|
||||||
#. Open the folder for the latest version (currently this is 2.4.2).
|
#. Open the folder for the latest version (currently this is |release|).
|
||||||
|
|
||||||
#. Choose a build you want to use and download it. The naming conventions used will show what kind of support they offer. For example:
|
#. Choose a build you want to use and download it. The naming conventions used will show what kind of support they offer. For example:
|
||||||
|
|
||||||
|
@ -210,13 +210,7 @@ if(ANDROID)
|
|||||||
list(REMOVE_ITEM android_lib_project_files "${ANDROID_MANIFEST_FILE}")
|
list(REMOVE_ITEM android_lib_project_files "${ANDROID_MANIFEST_FILE}")
|
||||||
foreach(f ${android_lib_project_files})
|
foreach(f ${android_lib_project_files})
|
||||||
if(NOT f MATCHES "\\.svn")
|
if(NOT f MATCHES "\\.svn")
|
||||||
add_custom_command(
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${f}" "${OpenCV_BINARY_DIR}/${f}")
|
||||||
OUTPUT "${OpenCV_BINARY_DIR}/${f}"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${f}" "${OpenCV_BINARY_DIR}/${f}"
|
|
||||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${f}"
|
|
||||||
COMMENT "Generating ${f}"
|
|
||||||
)
|
|
||||||
|
|
||||||
list(APPEND lib_proj_files "${OpenCV_BINARY_DIR}/${f}")
|
list(APPEND lib_proj_files "${OpenCV_BINARY_DIR}/${f}")
|
||||||
|
|
||||||
if(NOT f MATCHES "jni/.+")
|
if(NOT f MATCHES "jni/.+")
|
||||||
@ -250,11 +244,13 @@ if(ANDROID)
|
|||||||
COMMAND ${CMAKE_COMMAND} -E remove ${lib_target_files}
|
COMMAND ${CMAKE_COMMAND} -E remove ${lib_target_files}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${ANDROID_MANIFEST_FILE}" "${OpenCV_BINARY_DIR}/${ANDROID_MANIFEST_FILE}"
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${ANDROID_MANIFEST_FILE}" "${OpenCV_BINARY_DIR}/${ANDROID_MANIFEST_FILE}"
|
||||||
COMMAND ${ANDROID_EXECUTABLE} --silent create lib-project --path \"${OpenCV_BINARY_DIR}\" --target \"${lib_target_sdk_target}\" --name OpenCV --package org.opencv 2>\"${CMAKE_CURRENT_BINARY_DIR}/create_lib_project.log\"
|
COMMAND ${ANDROID_EXECUTABLE} --silent create lib-project --path \"${OpenCV_BINARY_DIR}\" --target \"${lib_target_sdk_target}\" --name OpenCV --package org.opencv 2>\"${CMAKE_CURRENT_BINARY_DIR}/create_lib_project.log\"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${ANDROID_MANIFEST_FILE}" "${OpenCV_BINARY_DIR}/${ANDROID_MANIFEST_FILE}"
|
|
||||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${ANDROID_MANIFEST_FILE}"
|
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${ANDROID_MANIFEST_FILE}"
|
||||||
DEPENDS ${lib_proj_files}
|
DEPENDS ${lib_proj_files}
|
||||||
COMMENT "Generating OpenCV Android library project. SDK target: ${lib_target_sdk_target}"
|
COMMENT "Generating OpenCV Android library project. SDK target: ${lib_target_sdk_target}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/android_lib/${ANDROID_MANIFEST_FILE}" "${OpenCV_BINARY_DIR}/${ANDROID_MANIFEST_FILE}")
|
||||||
|
|
||||||
install(FILES "${OpenCV_BINARY_DIR}/${ANDROID_PROJECT_PROPERTIES_FILE}" DESTINATION ${JAVA_INSTALL_ROOT} COMPONENT main)
|
install(FILES "${OpenCV_BINARY_DIR}/${ANDROID_PROJECT_PROPERTIES_FILE}" DESTINATION ${JAVA_INSTALL_ROOT} COMPONENT main)
|
||||||
install(FILES "${OpenCV_BINARY_DIR}/${ANDROID_MANIFEST_FILE}" DESTINATION ${JAVA_INSTALL_ROOT} COMPONENT main)
|
install(FILES "${OpenCV_BINARY_DIR}/${ANDROID_MANIFEST_FILE}" DESTINATION ${JAVA_INSTALL_ROOT} COMPONENT main)
|
||||||
# creating empty 'gen' and 'res' folders
|
# creating empty 'gen' and 'res' folders
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" path="gen"/>
|
<classpathentry kind="src" path="gen"/>
|
||||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||||
<classpathentry kind="output" path="cls"/>
|
<classpathentry kind="output" path="cls"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>OpenCV Library - 2.4.2</name>
|
<name>OpenCV Library - @OPENCV_VERSION_MAJOR@.@OPENCV_VERSION_MINOR@.@OPENCV_VERSION_PATCH@</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.opencv"
|
package="org.opencv"
|
||||||
android:versionCode="242"
|
android:versionCode="@OPENCV_VERSION_MAJOR@@OPENCV_VERSION_MINOR@@OPENCV_VERSION_PATCH@"
|
||||||
android:versionName="2.4.2">
|
android:versionName="@OPENCV_VERSION_MAJOR@.@OPENCV_VERSION_MINOR@.@OPENCV_VERSION_PATCH@"
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="8" />
|
<uses-sdk android:minSdkVersion="8" />
|
||||||
</manifest>
|
</manifest>
|
||||||
|
Loading…
Reference in New Issue
Block a user