mirror of
https://github.com/opencv/opencv.git
synced 2026-09-13 05:42:51 -05:00
Merge pull request #14673 from janstarzy:hidden-vis-with-java7
This commit is contained in:
@@ -16,6 +16,17 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
|
|
||||||
|
// make -fvisibility=hidden work with java 1.7
|
||||||
|
#if defined(__linux__) && !defined(__ANDROID__) && !defined (JNI_VERSION_1_8)
|
||||||
|
// adapted from jdk1.8/jni.h
|
||||||
|
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
|
||||||
|
#undef JNIEXPORT
|
||||||
|
#define JNIEXPORT __attribute__((visibility("default")))
|
||||||
|
#undef JNIIMPORT
|
||||||
|
#define JNIIMPORT __attribute__((visibility("default")))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
||||||
#include "opencv_java.hpp"
|
#include "opencv_java.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user