fixes #5019: python and java bindings become CMake modules (loadable plugins)
This commit is contained in:
parent
5cdf0e3e89
commit
0db10a3052
@ -346,9 +346,16 @@ endif(ANDROID)
|
||||
# workarounding lack of `__attribute__ ((visibility("default")))` in jni_md.h/JNIEXPORT
|
||||
string(REPLACE "-fvisibility=hidden" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
ocv_add_library(${the_module} SHARED ${handwritten_h_sources} ${handwritten_cpp_sources} ${generated_cpp_sources}
|
||||
if(ANDROID)
|
||||
# Android native code need to link with libopencv_java.so
|
||||
ocv_add_library(${the_module} SHARED ${handwritten_h_sources} ${handwritten_cpp_sources} ${generated_cpp_sources}
|
||||
${copied_files}
|
||||
"${JAR_FILE}" "${JAR_FILE}.dephelper")
|
||||
else()
|
||||
ocv_add_library(${the_module} MODULE ${handwritten_h_sources} ${handwritten_cpp_sources} ${generated_cpp_sources}
|
||||
${copied_files}
|
||||
"${JAR_FILE}" "${JAR_FILE}.dephelper")
|
||||
endif()
|
||||
|
||||
if(BUILD_FAT_JAVA_LIB)
|
||||
set(__deps ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_MODULES_BUILD})
|
||||
|
@ -46,7 +46,7 @@ add_custom_command(
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/headers.txt
|
||||
DEPENDS ${opencv_hdrs})
|
||||
|
||||
ocv_add_library(${the_module} SHARED ${PYTHON_SOURCE_DIR}/src2/cv2.cpp ${cv2_generated_hdrs})
|
||||
ocv_add_library(${the_module} MODULE ${PYTHON_SOURCE_DIR}/src2/cv2.cpp ${cv2_generated_hdrs})
|
||||
|
||||
if(PYTHON_DEBUG_LIBRARIES AND NOT PYTHON_LIBRARIES MATCHES "optimized.*debug")
|
||||
ocv_target_link_libraries(${the_module} debug ${PYTHON_DEBUG_LIBRARIES} optimized ${PYTHON_LIBRARIES})
|
||||
|
Loading…
Reference in New Issue
Block a user