Commit 8ee50c42 authored by Ethan Rublee's avatar Ethan Rublee

adding some small changes to support android build,

mainly cmake stuff, but in persistance the wcstombs
is not supported on android, and in
sift.cpp there was and ifdef that affected arm and this
causes undefined symbols on android.
parent a7320825
if(ANDROID)
configure_file("${CMAKE_SOURCE_DIR}/Android.mk.modules.in" "${CMAKE_CURRENT_BINARY_DIR}/Android.mk")
endif()
add_subdirectory(calib3d)
add_subdirectory(core)
add_subdirectory(features2d)
......@@ -20,8 +24,13 @@ if(PYTHONLIBS_FOUND AND BUILD_NEW_PYTHON_SUPPORT)
endif()
add_subdirectory(video)
if(!ANDROID)
add_subdirectory(haartraining)
add_subdirectory(traincascade)
add_subdirectory(gpu)
endif()
add_subdirectory(gpu)
......@@ -114,7 +114,7 @@ cv::string cv::FileStorage::getDefaultObjectName(const string& _filename)
namespace cv
{
#ifndef ANDROID //unsuported wcstombs on android
string fromUtf16(const WString& str)
{
cv::AutoBuffer<char> _buf(str.size()*4 + 1);
......@@ -138,7 +138,7 @@ WString toUtf16(const string& str)
buf[sz] = '\0';
return WString(buf);
}
#endif
}
typedef struct CvGenericHash
......
define_opencv_module(features2d opencv_core opencv_imgproc opencv_calib3d opencv_highgui)
\ No newline at end of file
define_opencv_module(features2d opencv_core opencv_imgproc opencv_calib3d opencv_highgui)
......@@ -48,7 +48,15 @@
#include "precomp.hpp"
#ifndef __arm__
#ifdef __arm__
#define ARM_NO_SIFT
#endif
#ifdef ANDROID
#undef ARM_NO_SIFT
#endif //ANDROID
#ifndef ARM_NO_SIFT
#include <iostream>
#include <limits>
......@@ -175,6 +183,7 @@ public:
typedef Keypoints::iterator KeypointsIter ; ///< Keypoint list iter datatype
typedef Keypoints::const_iterator KeypointsConstIter ; ///< Keypoint list const iter datatype
#undef _S
/** @brief Constructors and destructors */
/*@{*/
Sift(const pixel_t* _im_pt, int _width, int _height,
......
......@@ -3,6 +3,7 @@
# Some parts taken from version of Hartmut Seichter, HIT Lab NZ.
# Jose Luis Blanco, 2008
# ----------------------------------------------------------------------------
if(!ANDROID)
project(opencv_highgui)
if(WITH_JPEG)
......@@ -332,3 +333,21 @@ install(TARGETS ${the_target}
install(FILES ${highgui_ext_hdrs}
DESTINATION include/opencv2/highgui
COMPONENT main)
else(!ANDROID)
set(high_gui_android_srcs src/bitstrm.cpp
src/cap.cpp
src/grfmt_base.cpp
src/grfmt_bmp.cpp
src/grfmt_jpeg.cpp
src/grfmt_jpeg2000.cpp
src/grfmt_png.cpp
src/grfmt_tiff.cpp
src/loadsave.cpp
src/precomp.cpp
src/utils.cpp
src/grfmt_sunras.cpp
src/grfmt_pxm.cpp
src/window.cpp )
define_android_manual(highgui "${high_gui_android_srcs}" "$(LOCAL_PATH)/src $(OPENCV_INCLUDES)")
endif(!ANDROID)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment