提交 c92743d1 编写于 作者: A Andrey Kamaev

Eliminate intermediate build target "opencv_java_api"

上级 9c7a8dd5
...@@ -100,11 +100,6 @@ foreach(jfile ${handwrittren_java_sources}) ...@@ -100,11 +100,6 @@ foreach(jfile ${handwrittren_java_sources})
endif() endif()
endforeach() endforeach()
# remove VideoCapture wrapper if highgui is disabled
if(NOT HAVE_opencv_highgui)
list(REMOVE_ITEM handwrittren_cpp_sources "${CMAKE_CURRENT_SOURCE_DIR}/generator/src/cpp/VideoCapture.cpp")
endif()
# create list of javadoc documented files # create list of javadoc documented files
unset(documented_java_files) unset(documented_java_files)
foreach(java_file ${handwrittren_java_sources} ${generated_java_sources}) foreach(java_file ${handwrittren_java_sources} ${generated_java_sources})
...@@ -157,12 +152,9 @@ foreach(java_file ${source_java_files}) ...@@ -157,12 +152,9 @@ foreach(java_file ${source_java_files})
endif() endif()
endforeach() endforeach()
# custom target for java API
set(api_target ${the_module}_api)
add_custom_target(${api_target} DEPENDS ${java_files} ${documented_java_files} ${java_documented_headers_deps})
# add opencv_java library # add opencv_java library
add_library(${the_module} SHARED ${handwrittren_h_sources} ${handwrittren_cpp_sources} ${generated_cpp_sources}) add_library(${the_module} SHARED ${handwrittren_h_sources} ${handwrittren_cpp_sources} ${generated_cpp_sources}
${java_files} ${documented_java_files} ${java_documented_headers_deps})
if(BUILD_FAT_JAVA_LIB) if(BUILD_FAT_JAVA_LIB)
set(__deps ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_MODULES_BUILD}) set(__deps ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_MODULES_BUILD})
list(REMOVE_ITEM __deps ${the_module} opencv_ts) list(REMOVE_ITEM __deps ${the_module} opencv_ts)
...@@ -176,7 +168,6 @@ if(BUILD_FAT_JAVA_LIB) ...@@ -176,7 +168,6 @@ if(BUILD_FAT_JAVA_LIB)
else() else()
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS}) target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS})
endif() endif()
add_dependencies(${the_module} ${api_target})
# Additional target properties # Additional target properties
set_target_properties(${the_module} PROPERTIES set_target_properties(${the_module} PROPERTIES
...@@ -285,14 +276,13 @@ else(ANDROID) ...@@ -285,14 +276,13 @@ else(ANDROID)
COMMAND ${ANT_EXECUTABLE} -q -noinput -k jar COMMAND ${ANT_EXECUTABLE} -q -noinput -k jar
COMMAND ${CMAKE_COMMAND} -E touch "${OpenCV_BINARY_DIR}/bin/.${JAR_NAME}.dephelper" COMMAND ${CMAKE_COMMAND} -E touch "${OpenCV_BINARY_DIR}/bin/.${JAR_NAME}.dephelper"
WORKING_DIRECTORY "${OpenCV_BINARY_DIR}" WORKING_DIRECTORY "${OpenCV_BINARY_DIR}"
DEPENDS "${OpenCV_BINARY_DIR}/build.xml" ${java_files} DEPENDS "${OpenCV_BINARY_DIR}/build.xml" ${java_files} ${documented_java_files} ${java_documented_headers_deps}
COMMENT "Generating ${JAR_NAME}" COMMENT "Generating ${JAR_NAME}"
) )
add_custom_target(${lib_target} SOURCES "${OpenCV_BINARY_DIR}/bin/${JAR_NAME}") add_custom_target(${lib_target} SOURCES "${OpenCV_BINARY_DIR}/bin/${JAR_NAME}")
endif(ANDROID) endif(ANDROID)
add_dependencies(${lib_target} ${api_target})
add_dependencies(${the_module} ${lib_target}) add_dependencies(${the_module} ${lib_target})
# android test project # android test project
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册