|
|
|
@ -19,7 +19,6 @@ POPD |
|
|
|
|
IF NOT DEFINED BUILD_DIR SET BUILD_DIR=build |
|
|
|
|
IF NOT DEFINED ARM_TARGET SET ARM_TARGET=armeabi-v7a |
|
|
|
|
SET OPENCV_BUILD_DIR=%SCRIPTS_DIR%\..\%BUILD_DIR% |
|
|
|
|
SET ANDROID_OPENCV_BUILD_DIR=%SCRIPTS_DIR%\..\android-opencv\%BUILD_DIR% |
|
|
|
|
|
|
|
|
|
:: check that all required variables defined |
|
|
|
|
PUSHD . |
|
|
|
@ -34,9 +33,6 @@ IF NOT %BUILD_JAVA_PART%==1 GOTO required_variables_checked |
|
|
|
|
IF NOT DEFINED ANDROID_SDK (ECHO. & ECHO You should set an environment variable ANDROID_SDK to the full path to your copy of Android SDK & GOTO end) |
|
|
|
|
(CD "%ANDROID_SDK%" 2>NUL) || (ECHO. & ECHO Directory "%ANDROID_SDK%" specified by ANDROID_SDK variable does not exist & GOTO end) |
|
|
|
|
|
|
|
|
|
IF NOT DEFINED SWIG_DIR (ECHO. & ECHO You should set an environment variable SWIG_DIR to the full path to SWIG root & GOTO end) |
|
|
|
|
(CD "%SWIG_DIR%" 2>NUL) || (ECHO. & ECHO Directory "%SWIG_DIR%" specified by SWIG_DIR variable does not exist & GOTO end) |
|
|
|
|
|
|
|
|
|
IF NOT DEFINED ANT_DIR (ECHO. & ECHO You should set an environment variable ANT_DIR to the full path to Apache Ant root & GOTO end) |
|
|
|
|
(CD "%ANT_DIR%" 2>NUL) || (ECHO. & ECHO Directory "%ANT_DIR%" specified by ANT_DIR variable does not exist & GOTO end) |
|
|
|
|
|
|
|
|
@ -60,7 +56,7 @@ IF NOT %BUILD_OPENCV%==1 GOTO other-cmake |
|
|
|
|
("%CMAKE_EXE%" -G"MinGW Makefiles" -DARM_TARGET="%ARM_TARGET%" -C "%SOURCE_DIR%\CMakeCache.android.initial.cmake" -DCMAKE_TOOLCHAIN_FILE="%SOURCE_DIR%"\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM="%MAKE_EXE%" %* "%SOURCE_DIR%\..") && GOTO cmakefin |
|
|
|
|
ECHO. & ECHO cmake failed & GOTO end |
|
|
|
|
:other-cmake |
|
|
|
|
("%CMAKE_EXE%" -G"MinGW Makefiles" -DARM_TARGET="%ARM_TARGET%" -DOpenCV_DIR="%OPENCV_BUILD_DIR%" -DAndroidOpenCV_DIR="%ANDROID_OPENCV_BUILD_DIR%" -DCMAKE_PROGRAM_PATH="%SWIG_DIR%" -DCMAKE_TOOLCHAIN_FILE="%OPENCV_BUILD_DIR%\..\android.toolchain.cmake" -DCMAKE_MAKE_PROGRAM="%MAKE_EXE%" %* "%SOURCE_DIR%") && GOTO cmakefin |
|
|
|
|
("%CMAKE_EXE%" -G"MinGW Makefiles" -DARM_TARGET="%ARM_TARGET%" -DOpenCV_DIR="%OPENCV_BUILD_DIR%" -DCMAKE_TOOLCHAIN_FILE="%OPENCV_BUILD_DIR%\..\android.toolchain.cmake" -DCMAKE_MAKE_PROGRAM="%MAKE_EXE%" %* "%SOURCE_DIR%") && GOTO cmakefin |
|
|
|
|
ECHO. & ECHO cmake failed & GOTO end |
|
|
|
|
:cmakefin |
|
|
|
|
|
|
|
|
|