cmake: fix linker dependencies for opencv_java

Linker dependencies to all OpenCV modules are invalid.
We should not include other bindings in this list (like "opencv_python").
This commit is contained in:
Alexander Alekhin
2013-10-24 19:04:41 +04:00
parent f0bc253d0e
commit 4b17d073c0
2 changed files with 18 additions and 1 deletions

View File

@@ -274,7 +274,12 @@ add_library(${the_module} SHARED ${handwrittren_h_sources} ${handwrittren_cpp_so
"${JAR_FILE}" "${JAR_FILE}.dephelper")
if(BUILD_FAT_JAVA_LIB)
set(__deps ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_MODULES_BUILD})
list(REMOVE_ITEM __deps ${the_module} opencv_ts)
foreach(m ${OPENCV_MODULES_BUILD}) # filterout INTERNAL (like opencv_ts) and BINDINGS (like opencv_python) modules
ocv_assert(DEFINED OPENCV_MODULE_${m}_CLASS)
if(NOT OPENCV_MODULE_${m}_CLASS STREQUAL "PUBLIC")
list(REMOVE_ITEM __deps ${m})
endif()
endforeach()
ocv_list_unique(__deps)
set(__extradeps ${__deps})
ocv_list_filterout(__extradeps "^opencv_")