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
166bfdda
Commit
166bfdda
authored
May 28, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated build scripts for HelloAndroid sample.
parent
eadb3bad
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
3 deletions
+29
-3
CMakeLists.txt
android/apps/HelloAndroid/CMakeLists.txt
+22
-0
cmake_android.sh
android/apps/HelloAndroid/cmake_android.sh
+1
-1
run.cmd
android/apps/HelloAndroid/run.cmd
+4
-1
run.sh
android/apps/HelloAndroid/run.sh
+2
-1
No files found.
android/apps/HelloAndroid/CMakeLists.txt
View file @
166bfdda
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
#########################################################
# Set project name
#########################################################
IF
(
NOT PROJECT_NAME
)
IF
(
NOT
"x$ENV{PROJECT_NAME}"
STREQUAL
"x"
)
SET
(
PROJECT_NAME $ENV{PROJECT_NAME}
)
...
...
@@ -43,3 +47,21 @@ FILE( GLOB srcs "*.cpp" )
ADD_EXECUTABLE
(
${
PROJECT_NAME
}
${
srcs
}
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
${
LIBRARY_DEPS
}
)
#########################################################
# Summary report
#########################################################
message
(
STATUS
""
)
message
(
STATUS
"General configuration for
${
PROJECT_NAME
}
====================================="
)
message
(
STATUS
""
)
message
(
STATUS
" OpenCV path:
${
OpenCV_DIR
}
"
)
message
(
STATUS
" Compiler:
${
CMAKE_COMPILER
}
"
)
message
(
STATUS
" C++ flags (Release):
${
CMAKE_CXX_FLAGS
}
${
CMAKE_CXX_FLAGS_RELEASE
}
"
)
message
(
STATUS
" C++ flags (Debug):
${
CMAKE_CXX_FLAGS
}
${
CMAKE_CXX_FLAGS_DEBUG
}
"
)
if
(
WIN32
)
message
(
STATUS
" Linker flags (Release):
${
CMAKE_EXE_LINKER_FLAGS
}
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
"
)
message
(
STATUS
" Linker flags (Debug):
${
CMAKE_EXE_LINKER_FLAGS
}
${
CMAKE_EXE_LINKER_FLAGS_DEBUG
}
"
)
else
()
message
(
STATUS
" Linker flags (Release):
${
CMAKE_SHARED_LINKER_FLAGS
}
${
CMAKE_SHARED_LINKER_FLAGS_RELEASE
}
"
)
message
(
STATUS
" Linker flags (Debug):
${
CMAKE_SHARED_LINKER_FLAGS
}
${
CMAKE_SHARED_LINKER_FLAGS_DEBUG
}
"
)
endif
()
android/apps/HelloAndroid/cmake_android.sh
View file @
166bfdda
...
...
@@ -3,7 +3,7 @@ cd `dirname $0`
BUILD_DIR
=
build_armeabi
opencv_android
=
`
pwd
`
/../..
opencv_build_dir
=
$opencv_android
/
build
opencv_build_dir
=
$opencv_android
/
$BUILD_DIR
mkdir
-p
$BUILD_DIR
cd
$BUILD_DIR
...
...
android/apps/HelloAndroid/run.cmd
View file @
166bfdda
...
...
@@ -25,8 +25,11 @@ IF NOT DEFINED ANDROID_SDK (ECHO. & ECHO You should set an environment variable
(PUSHD "%ANDROID_SDK%" 2>NUL && POPD) || (ECHO. & ECHO Directory "%ANDROID_SDK%" specified by ANDROID_SDK variable does not exist & GOTO end)
SET adb=%ANDROID_SDK%\platform-tools\adb.exe
::binary output path is different for emulator build
IF "%ARM_TARGET%"=="armeabi" (SET OUT_DIR=armeabi) ELSE (SET OUT_DIR=armeabi-v7a)
:: copy file to device (usually takes 10 seconds or more)
%adb% push .\bin\
armeabi
\%PROJECT_NAME% /data/bin/sample/%PROJECT_NAME% || GOTO end
%adb% push .\bin\
%OUT_DIR%
\%PROJECT_NAME% /data/bin/sample/%PROJECT_NAME% || GOTO end
:: set execute permission
%adb% shell chmod 777 /data/bin/sample/%PROJECT_NAME% || GOTO end
...
...
android/apps/HelloAndroid/run.sh
View file @
166bfdda
#!/bin/sh
cd
`
dirname
$0
`
PROJECT_NAME
=
HelloAndroid
OUT_DIR
=
armeabi
# copy file to device (usually takes 10 seconds or more)
adb push ./bin/
armeabi
/
$PROJECT_NAME
/data/bin/sample/
$PROJECT_NAME
||
return
adb push ./bin/
$OUT_DIR
/
$PROJECT_NAME
/data/bin/sample/
$PROJECT_NAME
||
return
# set execute permission
adb shell
chmod
777 /data/bin/sample/
$PROJECT_NAME
||
return
...
...
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