diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt index 30aa9efe6a..ad10aafc52 100644 --- a/modules/java/CMakeLists.txt +++ b/modules/java/CMakeLists.txt @@ -269,6 +269,10 @@ else(ANDROID) endif(ANDROID) # step 5: build native part + +# workarounding lack of `__attribute__ ((visibility("default")))` in jni_md.h/JNIEXPORT +string(REPLACE "-fvisibility=hidden" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + add_library(${the_module} SHARED ${handwrittren_h_sources} ${handwrittren_cpp_sources} ${generated_cpp_sources} ${copied_files} "${JAR_FILE}" "${JAR_FILE}.dephelper")