1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

cmake: +opencv_videoio_plugins virtual target

- support comma-separated list in VIDEOIO_PLUGIN_LIST
- opencv tests/samples depend on plugins virtual target
This commit is contained in:
Alexander Alekhin
2019-03-02 08:31:56 +00:00
parent c3cf35ab63
commit 9a6f2630b2
3 changed files with 25 additions and 0 deletions
+12
View File
@@ -1152,6 +1152,10 @@ function(ocv_add_perf_tests)
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${perf_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_PERF_${the_module}_DEPS})
add_dependencies(opencv_perf_tests ${the_target})
if(TARGET opencv_videoio_plugins)
add_dependencies(${the_target} opencv_videoio_plugins)
endif()
if(HAVE_HPX)
message("Linking HPX to Perf test of module ${name}")
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
@@ -1242,6 +1246,10 @@ function(ocv_add_accuracy_tests)
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${test_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_TEST_${the_module}_DEPS})
add_dependencies(opencv_tests ${the_target})
if(TARGET opencv_videoio_plugins)
add_dependencies(${the_target} opencv_videoio_plugins)
endif()
if(HAVE_HPX)
message("Linking HPX to Perf test of module ${name}")
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
@@ -1324,6 +1332,10 @@ function(ocv_add_samples)
endif()
add_dependencies(${parent_target} ${the_target})
if(TARGET opencv_videoio_plugins)
add_dependencies(${the_target} opencv_videoio_plugins)
endif()
if(WIN32)
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/${module_id}" COMPONENT samples)
endif()