Fixed Android build

pull/13383/head
Andrey Kamaev 14 years ago
parent 562914e33b
commit 87cfcc8ee2
  1. 4
      android/android.toolchain.cmake
  2. 2
      modules/objdetect/src/datamatrix.cpp

@ -318,8 +318,8 @@ else()
endif()
if( BUILD_WITH_ANDROID_NDK )
set( CMAKE_CXX_FLAGS "--sysroot='${ANDROID_NDK_SYSROOT}' ${CMAKE_CXX_FLAGS}" )
set( CMAKE_C_FLAGS "--sysroot='${ANDROID_NDK_SYSROOT}' ${CMAKE_C_FLAGS}" )
set( CMAKE_CXX_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_CXX_FLAGS}" )
set( CMAKE_C_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_C_FLAGS}" )
if (ANDROID_NDK_SYSROOT MATCHES "[ ]")
# workaround for ugly cmake bug - compiler identification replaces all spaces in compiler flags with ; symbol
# as result identification fails if ANDROID_NDK_SYSROOT contain spaces

@ -502,7 +502,7 @@ namespace
DataMatrixCode operator()(CvDataMatrixCode& cvdm)
{
DataMatrixCode dm;
std::memcpy(dm.msg,cvdm.msg,sizeof(cvdm.msg));
memcpy(dm.msg,cvdm.msg,sizeof(cvdm.msg));
dm.original = cv::Mat(cvdm.original,true);
cvReleaseMat(&cvdm.original);
cv::Mat c(cvdm.corners,true);

Loading…
Cancel
Save