mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[opencv] added openvino support (#34727)
* opencv: added openvino support * updated version database
This commit is contained in:
parent
cbb9d90a2e
commit
1c00eae503
25
ports/opencv4/0021-static-openvino.patch
Normal file
25
ports/opencv4/0021-static-openvino.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
|
||||
index 437042958e..a90eb5a5ab 100644
|
||||
--- a/cmake/OpenCVUtils.cmake
|
||||
+++ b/cmake/OpenCVUtils.cmake
|
||||
@@ -1632,13 +1632,19 @@ function(ocv_add_external_target name inc link def)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
+set(__OPENCV_EXPORTED_EXTERNAL_TARGETS "" CACHE INTERNAL "")
|
||||
function(ocv_install_used_external_targets)
|
||||
if(NOT BUILD_SHARED_LIBS
|
||||
AND NOT (CMAKE_VERSION VERSION_LESS "3.13.0") # upgrade CMake: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/2152
|
||||
)
|
||||
foreach(tgt in ${ARGN})
|
||||
if(tgt MATCHES "^ocv\.3rdparty\.")
|
||||
- install(TARGETS ${tgt} EXPORT OpenCVModules)
|
||||
+ list(FIND __OPENCV_EXPORTED_EXTERNAL_TARGETS "${tgt}" _found)
|
||||
+ if(_found EQUAL -1) # don't export target twice
|
||||
+ install(TARGETS ${tgt} EXPORT OpenCVModules)
|
||||
+ list(APPEND __OPENCV_EXPORTED_EXTERNAL_TARGETS "${tgt}")
|
||||
+ set(__OPENCV_EXPORTED_EXTERNAL_TARGETS "${__OPENCV_EXPORTED_EXTERNAL_TARGETS}" CACHE INTERNAL "")
|
||||
+ endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
@ -29,6 +29,7 @@ vcpkg_from_github(
|
||||
0017-fix-flatbuffers.patch
|
||||
0019-missing-include.patch
|
||||
0020-fix-compat-cuda12.2.patch
|
||||
0021-static-openvino.patch # https://github.com/opencv/opencv/pull/23963
|
||||
"${ARM64_WINDOWS_FIX}"
|
||||
)
|
||||
# Disallow accidental build of vendored copies
|
||||
@ -85,9 +86,13 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
||||
# Cannot use vcpkg_check_features() for "dnn", "gtk", ipp", "openmp", "ovis", "python", "qt", "tbb"
|
||||
set(BUILD_opencv_dnn OFF)
|
||||
set(WITH_OPENVINO OFF)
|
||||
if("dnn" IN_LIST FEATURES)
|
||||
if(NOT VCPKG_TARGET_IS_ANDROID)
|
||||
set(BUILD_opencv_dnn ON)
|
||||
if(NOT VCPKG_TARGET_IS_UWP)
|
||||
set(WITH_OPENVINO ON)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "The dnn module cannot be enabled on Android")
|
||||
endif()
|
||||
@ -446,6 +451,7 @@ vcpkg_cmake_configure(
|
||||
-DWITH_PROTOBUF=${BUILD_opencv_dnn}
|
||||
-DWITH_PYTHON=${WITH_PYTHON}
|
||||
-DWITH_OPENCLAMDBLAS=OFF
|
||||
-DWITH_OPENVINO=${WITH_OPENVINO}
|
||||
-DWITH_TBB=${WITH_TBB}
|
||||
-DWITH_OPENJPEG=OFF
|
||||
-DWITH_CPUFEATURES=OFF
|
||||
@ -526,6 +532,9 @@ find_dependency(Tesseract)")
|
||||
if("lapack" IN_LIST FEATURES)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(LAPACK)")
|
||||
endif()
|
||||
if(WITH_OPENVINO)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(OpenVINO CONFIG)")
|
||||
endif()
|
||||
if("openexr" IN_LIST FEATURES)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)")
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "opencv4",
|
||||
"version": "4.8.0",
|
||||
"port-version": 7,
|
||||
"port-version": 8,
|
||||
"description": "computer vision library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "Apache-2.0",
|
||||
@ -109,6 +109,10 @@
|
||||
"host": true,
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "openvino",
|
||||
"platform": "!uwp"
|
||||
},
|
||||
"protobuf"
|
||||
]
|
||||
},
|
||||
|
@ -6150,7 +6150,7 @@
|
||||
},
|
||||
"opencv4": {
|
||||
"baseline": "4.8.0",
|
||||
"port-version": 7
|
||||
"port-version": 8
|
||||
},
|
||||
"opendnp3": {
|
||||
"baseline": "3.1.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "48c97b54fceaef9a96d374693f47e3ea91383f3c",
|
||||
"version": "4.8.0",
|
||||
"port-version": 8
|
||||
},
|
||||
{
|
||||
"git-tree": "ef78c1958b122045e9d1e353150049431b3162fa",
|
||||
"version": "4.8.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user