mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 20:18:53 +08:00
44fb94f7a1
Given the following manifest (when `dnn` feature is not included): ```json "dependencies": [ { "name": "opencv4", "version>=": "4.8.0#18", "default-features": false, "features": [ "png" ] } ] ``` it failed and here is what `vcpkg/buildtrees/opencv4/config-x64-linux-out.log` said: ``` ... CMake Error at /home/peter/open-source/git/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package): Could not find a package configuration file provided by "flatbuffers" with any of the following names: flatbuffersConfig.cmake flatbuffers-config.cmake Add the installation prefix of "flatbuffers" to CMAKE_PREFIX_PATH or set "flatbuffers_DIR" to a directory containing one of the above files. If "flatbuffers" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:759 (find_package) ... ``` This problem is introduced by [commit6d2c9714
](6d2c971458
) contributed by @jimwang118 In the patch `vcpkg/ports/opencv4/0023-fix-no-flatbuffers.patch`, Jim disabled the procedure of `Flatbuffers` detection introduced by the previous patch `0017-fix-flatbuffers.patch`, which has correctly fixed the `flatbuffers`-related issues. ```patch ... --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -756,7 +756,7 @@ include(cmake/OpenCVFindLibsVideo.cmake) include(cmake/OpenCVFindLibsPerf.cmake) include(cmake/OpenCVFindLAPACK.cmake) include(cmake/OpenCVFindProtobuf.cmake) -include(cmake/OpenCVDetectFlatbuffers.cmake) +find_package(flatbuffers CONFIG REQUIRED) ... ``` In `vcpkg/ports/opencv4/vcpkg.json` we can see, `flatbuffers` is only the dependency of feature `dnn`: ```json "dependencies": [ ... "dnn": { "description": "Enable dnn module", "dependencies": [ "flatbuffers", { "name": "flatbuffers", "host": true, "default-features": false }, "protobuf" ] }, ... ``` and when `dnn` is not enabled, it broke down at the line `find_package(flatbuffers CONFIG REQUIRED)` And this change is unnecessary either: ```patch - list(APPEND libs ocv.3rdparty.flatbuffers) + list(APPEND libs flatbuffers::flatbuffers) ``` Thus, we'd better to revert those changes. Co-authored-by: WentsingNee <8090395+wentsingnee@user.noreply.gitee.com>
401 lines
8.2 KiB
JSON
401 lines
8.2 KiB
JSON
{
|
|
"name": "opencv4",
|
|
"version": "4.8.0",
|
|
"port-version": 19,
|
|
"description": "computer vision library",
|
|
"homepage": "https://github.com/opencv/opencv",
|
|
"license": "Apache-2.0",
|
|
"dependencies": [
|
|
{
|
|
"name": "vcpkg-cmake",
|
|
"host": true
|
|
},
|
|
{
|
|
"name": "vcpkg-cmake-config",
|
|
"host": true
|
|
},
|
|
{
|
|
"name": "vcpkg-get-python-packages",
|
|
"host": true
|
|
},
|
|
"zlib"
|
|
],
|
|
"default-features": [
|
|
"default-features"
|
|
],
|
|
"features": {
|
|
"ade": {
|
|
"description": "graph api",
|
|
"dependencies": [
|
|
"ade"
|
|
]
|
|
},
|
|
"contrib": {
|
|
"description": "opencv_contrib module",
|
|
"dependencies": [
|
|
{
|
|
"name": "hdf5",
|
|
"platform": "!uwp & !(windows & (arm | arm64)) & !ios"
|
|
},
|
|
{
|
|
"name": "tesseract",
|
|
"platform": "!uwp & !(windows & (arm | arm64)) & !ios"
|
|
}
|
|
]
|
|
},
|
|
"cuda": {
|
|
"description": "CUDA support for opencv",
|
|
"dependencies": [
|
|
"cuda",
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"contrib"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"cudnn": {
|
|
"description": "cuDNN support for opencv",
|
|
"dependencies": [
|
|
"cudnn",
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"cuda"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"dc1394": {
|
|
"description": "Dc1394 support for opencv",
|
|
"dependencies": [
|
|
"libdc1394"
|
|
]
|
|
},
|
|
"default-features": {
|
|
"description": "Platform-dependent default features",
|
|
"dependencies": [
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"dnn",
|
|
"jpeg",
|
|
"png",
|
|
"quirc",
|
|
"tiff",
|
|
"webp"
|
|
]
|
|
},
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"gtk"
|
|
],
|
|
"platform": "linux"
|
|
}
|
|
]
|
|
},
|
|
"dnn": {
|
|
"description": "Enable dnn module",
|
|
"dependencies": [
|
|
"flatbuffers",
|
|
{
|
|
"name": "flatbuffers",
|
|
"host": true,
|
|
"default-features": false
|
|
},
|
|
"protobuf"
|
|
]
|
|
},
|
|
"dnn-cuda": {
|
|
"description": "Build dnn module with CUDA support",
|
|
"dependencies": [
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"cudnn",
|
|
"dnn"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"eigen": {
|
|
"description": "Eigen support for opencv",
|
|
"dependencies": [
|
|
"eigen3"
|
|
]
|
|
},
|
|
"ffmpeg": {
|
|
"description": "ffmpeg support for opencv",
|
|
"dependencies": [
|
|
{
|
|
"name": "ffmpeg",
|
|
"default-features": false,
|
|
"features": [
|
|
"avcodec",
|
|
"avformat",
|
|
"swresample",
|
|
"swscale"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"freetype": {
|
|
"description": "Freetype support for opencv",
|
|
"dependencies": [
|
|
{
|
|
"name": "freetype",
|
|
"default-features": false
|
|
},
|
|
{
|
|
"name": "harfbuzz",
|
|
"default-features": false
|
|
}
|
|
]
|
|
},
|
|
"gdcm": {
|
|
"description": "GDCM support for opencv",
|
|
"dependencies": [
|
|
"gdcm"
|
|
]
|
|
},
|
|
"gstreamer": {
|
|
"description": "gstreamer support for opencv",
|
|
"dependencies": [
|
|
{
|
|
"name": "gstreamer",
|
|
"default-features": false,
|
|
"features": [
|
|
"plugins-base"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gtk": {
|
|
"description": "GTK support for opencv",
|
|
"supports": "!windows & !osx & !ios & !android",
|
|
"dependencies": [
|
|
{
|
|
"name": "gtk3",
|
|
"default-features": false
|
|
}
|
|
]
|
|
},
|
|
"halide": {
|
|
"description": "Halide support for opencv",
|
|
"dependencies": [
|
|
"halide",
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false
|
|
},
|
|
{
|
|
"name": "opencv4",
|
|
"features": [
|
|
"dnn"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ipp": {
|
|
"description": "Enable Intel Integrated Performance Primitives"
|
|
},
|
|
"jasper": {
|
|
"description": "JPEG 2000 support for opencv (deprecated)",
|
|
"dependencies": [
|
|
"jasper"
|
|
]
|
|
},
|
|
"jpeg": {
|
|
"description": "JPEG support for opencv",
|
|
"dependencies": [
|
|
"libjpeg-turbo"
|
|
]
|
|
},
|
|
"lapack": {
|
|
"description": "LAPACK support for opencv",
|
|
"dependencies": [
|
|
"blas",
|
|
"lapack"
|
|
]
|
|
},
|
|
"nonfree": {
|
|
"description": "allow nonfree and unredistributable libraries"
|
|
},
|
|
"openexr": {
|
|
"description": "OpenEXR support for opencv",
|
|
"dependencies": [
|
|
"openexr"
|
|
]
|
|
},
|
|
"opengl": {
|
|
"description": "opengl support for opencv",
|
|
"dependencies": [
|
|
"opengl"
|
|
]
|
|
},
|
|
"openjpeg": {
|
|
"description": "JPEG 2000 support for opencv",
|
|
"dependencies": [
|
|
"openjpeg"
|
|
]
|
|
},
|
|
"openmp": {
|
|
"description": "Enable openmp support for opencv"
|
|
},
|
|
"openvino": {
|
|
"description": "OpenVINO support for OpenCV DNN",
|
|
"supports": "!uwp & !x86",
|
|
"dependencies": [
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"dnn"
|
|
]
|
|
},
|
|
{
|
|
"name": "openvino",
|
|
"default-features": false,
|
|
"features": [
|
|
"auto",
|
|
"cpu",
|
|
"hetero"
|
|
]
|
|
},
|
|
{
|
|
"name": "openvino",
|
|
"default-features": false,
|
|
"features": [
|
|
"gpu"
|
|
],
|
|
"platform": "x64 & !(osx | uwp)"
|
|
}
|
|
]
|
|
},
|
|
"ovis": {
|
|
"description": "opencv_ovis module",
|
|
"dependencies": [
|
|
"ogre",
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"contrib"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"png": {
|
|
"description": "PNG support for opencv",
|
|
"dependencies": [
|
|
"libpng"
|
|
]
|
|
},
|
|
"python": {
|
|
"description": "Python wrapper support for opencv",
|
|
"dependencies": [
|
|
"python3"
|
|
]
|
|
},
|
|
"qt": {
|
|
"description": "Qt GUI support for opencv",
|
|
"dependencies": [
|
|
"qt5compat",
|
|
{
|
|
"name": "qtbase",
|
|
"default-features": false,
|
|
"features": [
|
|
"concurrent",
|
|
"gui",
|
|
"testlib",
|
|
"widgets"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"quirc": {
|
|
"description": "Enable QR code module",
|
|
"dependencies": [
|
|
"quirc"
|
|
]
|
|
},
|
|
"sfm": {
|
|
"description": "opencv_sfm module",
|
|
"dependencies": [
|
|
"ceres",
|
|
"gflags",
|
|
"glog",
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"contrib"
|
|
]
|
|
},
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"eigen"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"tbb": {
|
|
"description": "Enable Intel Threading Building Blocks",
|
|
"dependencies": [
|
|
"tbb"
|
|
]
|
|
},
|
|
"tiff": {
|
|
"description": "TIFF support for opencv",
|
|
"dependencies": [
|
|
{
|
|
"name": "tiff",
|
|
"default-features": false
|
|
}
|
|
]
|
|
},
|
|
"vtk": {
|
|
"description": "vtk support for opencv",
|
|
"dependencies": [
|
|
{
|
|
"name": "opencv4",
|
|
"features": [
|
|
"contrib"
|
|
]
|
|
},
|
|
"vtk"
|
|
]
|
|
},
|
|
"vulkan": {
|
|
"description": "Vulkan support for opencv dnn",
|
|
"dependencies": [
|
|
{
|
|
"name": "opencv4",
|
|
"default-features": false,
|
|
"features": [
|
|
"dnn"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"webp": {
|
|
"description": "WebP support for opencv",
|
|
"dependencies": [
|
|
"libwebp"
|
|
]
|
|
},
|
|
"world": {
|
|
"description": "Compile to a single package support for opencv"
|
|
}
|
|
}
|
|
}
|