From f99f58d99f9b3d69e7a4324463194543c2bc95f6 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Mon, 10 Jun 2019 14:13:54 +0300 Subject: [PATCH] Allow setting IS_PART_OF_WORLD in command line, fix videoio plugin linking --- cmake/OpenCVModule.cmake | 1 + modules/videoio/cmake/plugin.cmake | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index 2ac4656efc..799592b0c4 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -185,6 +185,7 @@ macro(ocv_add_module _name) # add self to the world dependencies if((NOT DEFINED OPENCV_MODULE_IS_PART_OF_WORLD AND NOT OPENCV_MODULE_${the_module}_CLASS STREQUAL "BINDINGS" + AND (NOT DEFINED OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD OR OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD) AND (NOT OPENCV_PROCESSING_EXTRA_MODULES OR NOT OPENCV_WORLD_EXCLUDE_EXTRA_MODULES) AND (NOT BUILD_SHARED_LIBS OR NOT "x${OPENCV_MODULE_TYPE}" STREQUAL "xSTATIC")) OR OPENCV_MODULE_IS_PART_OF_WORLD diff --git a/modules/videoio/cmake/plugin.cmake b/modules/videoio/cmake/plugin.cmake index be73948ff3..6252452fa9 100644 --- a/modules/videoio/cmake/plugin.cmake +++ b/modules/videoio/cmake/plugin.cmake @@ -21,8 +21,8 @@ function(ocv_create_builtin_videoio_plugin name target) target_link_libraries(${name} PRIVATE ${target}) foreach(mod opencv_videoio opencv_core opencv_imgproc opencv_imgcodecs) - target_link_libraries(${name} PRIVATE ${mod}) - target_include_directories(${name} PRIVATE "${OPENCV_MODULE_${mod}_LOCATION}/include") + ocv_target_link_libraries(${name} LINK_PRIVATE ${mod}) + ocv_target_include_directories(${name} PRIVATE "${OPENCV_MODULE_${mod}_LOCATION}/include") endforeach() set_target_properties(${name} PROPERTIES