Merged the trunk r8589:8653 - all changes related to build warnings

This commit is contained in:
Andrey Kamaev
2012-06-15 13:04:17 +00:00
parent 73c152abc4
commit bd0e0b5800
438 changed files with 20374 additions and 19674 deletions

View File

@@ -162,6 +162,8 @@ else()
endif()
add_dependencies(${the_module} ${api_target})
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations)
# Additional target properties
set_target_properties(${the_module} PROPERTIES
OUTPUT_NAME "${the_module}"

View File

@@ -1,5 +1,23 @@
#include <jni.h>
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_NONFREE
# include "opencv2/nonfree/nonfree.hpp"
#endif
#ifdef HAVE_OPENCV_FEATURES2D
# include "opencv2/features2d/features2d.hpp"
#endif
#ifdef HAVE_OPENCV_VIDEO
# include "opencv2/video/video.hpp"
#endif
#ifdef HAVE_OPENCV_ML
# include "opencv2/ml/ml.hpp"
#endif
extern "C" {
JNIEXPORT jint JNICALL
@@ -9,6 +27,23 @@ JNI_OnLoad(JavaVM* vm, void* reserved)
if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)
return -1;
bool init = true;
#ifdef HAVE_OPENCV_NONFREE
init &= cv::initModule_nonfree();
#endif
#ifdef HAVE_OPENCV_FEATURES2D
init &= cv::initModule_features2d();
#endif
#ifdef HAVE_OPENCV_VIDEO
init &= cv::initModule_video();
#endif
#ifdef HAVE_OPENCV_ML
init &= cv::initModule_ml();
#endif
if(!init)
return -1;
/* get class with (*env)->FindClass */
/* register methods with (*env)->RegisterNatives */
@@ -21,16 +56,4 @@ JNI_OnUnload(JavaVM *vm, void *reserved)
//do nothing
}
} // extern "C"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_MODULES_NONFREE
#include "opencv2/nonfree/nonfree.hpp"
static bool makeUseOfNonfree = initModule_nonfree();
#endif
#if HAVE_OPENCV_MODULES_FEATURES2D
#include "opencv2/features2d/features2d.hpp"
static bool makeUseOfNonfree = initModule_features2d();
#endif
} // extern "C"