Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
746cd1e1
Commit
746cd1e1
authored
Mar 04, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13949 from alalek:videoio_plugins_target
parents
19cf5118
9a6f2630
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+12
-0
CMakeLists.txt
modules/videoio/CMakeLists.txt
+7
-0
plugin.cmake
modules/videoio/cmake/plugin.cmake
+6
-0
No files found.
cmake/OpenCVModule.cmake
View file @
746cd1e1
...
...
@@ -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
()
...
...
modules/videoio/CMakeLists.txt
View file @
746cd1e1
...
...
@@ -3,6 +3,13 @@ set(VIDEOIO_ENABLE_PLUGINS "ON" CACHE BOOL "Allow building videoio plugin suppor
set
(
VIDEOIO_ENABLE_STRICT_PLUGIN_CHECK
"ON"
CACHE BOOL
"Make sure OpenCV version is the same in plugin and host code"
)
mark_as_advanced
(
VIDEOIO_PLUGIN_LIST VIDEOIO_ENABLE_PLUGINS VIDEOIO_ENABLE_STRICT_PLUGIN_CHECK
)
string
(
REPLACE
","
";"
VIDEOIO_PLUGIN_LIST
"
${
VIDEOIO_PLUGIN_LIST
}
"
)
# support comma-separated list (,) too
# Make virtual opencv_videoio_plugins target
if
(
NOT TARGET opencv_videoio_plugins
)
add_custom_target
(
opencv_videoio_plugins ALL
)
endif
()
ocv_add_module
(
videoio opencv_imgproc opencv_imgcodecs WRAP java python
)
set
(
videoio_hdrs
${
CMAKE_CURRENT_LIST_DIR
}
/src/precomp.hpp
)
...
...
modules/videoio/cmake/plugin.cmake
View file @
746cd1e1
...
...
@@ -3,6 +3,8 @@
function
(
ocv_create_builtin_videoio_plugin name target videoio_src_file
)
ocv_debug_message
(
"ocv_create_builtin_videoio_plugin(
${
ARGV
}
)"
)
if
(
NOT TARGET
${
target
}
)
message
(
FATAL_ERROR
"
${
target
}
does not exist!"
)
endif
()
...
...
@@ -10,6 +12,8 @@ function(ocv_create_builtin_videoio_plugin name target videoio_src_file)
message
(
FATAL_ERROR
"OpenCV_SOURCE_DIR must be set to build the plugin!"
)
endif
()
message
(
STATUS
"Video I/O: add builtin plugin '
${
name
}
'"
)
add_library
(
${
name
}
MODULE
"
${
CMAKE_CURRENT_LIST_DIR
}
/src/
${
videoio_src_file
}
"
"
${
CMAKE_CURRENT_LIST_DIR
}
/src/plugin_api.cpp"
)
...
...
@@ -28,6 +32,8 @@ function(ocv_create_builtin_videoio_plugin name target videoio_src_file)
)
install
(
TARGETS
${
name
}
LIBRARY DESTINATION
${
OPENCV_LIB_INSTALL_PATH
}
COMPONENT plugins OPTIONAL
)
add_dependencies
(
opencv_videoio_plugins
${
name
}
)
endfunction
()
#=============================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment