microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.06k stars 6.36k forks source link

Specified opencv 4.7.0 in overrides but 4.8.0 is used #33947

Closed zchrissirhcz closed 12 months ago

zchrissirhcz commented 1 year ago

Describe the bug I specified opencv with 4.7.0 version in "overrides" in vcpkg.json. My project build OK but uses wrong version(opencv 4.8.0).

Environment

To Reproduce Steps to reproduce the behavior:

  1. Create vcpkg.json with contents:

    {
    "name": "video-to-ascii",
    "version-string": "0.0.1",
    "dependencies": [
    "opencv"
    ],
    "overrides": [
    {
      "name": "opencv",
      "version": "4.7.0"
    }
    ],
    "builtin-baseline": "78ba9711d30c64a6b40462c72f356c681e2255f3"
    }
  2. Create test.cpp:

    
    #include <opencv2/opencv.hpp>

int main() { printf("OpenCV: %s", cv::getBuildInformation().c_str()); return 0; }


3. Create CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.25)
project(test)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

find_package(OpenCV REQUIRED)

add_executable(test
    test.cpp
)

target_link_libraries(test PRIVATE opencv_core)
  1. Invoke cmake via commands:

    cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$HOME/work/vcpkg/scripts/buildsystems/vcpkg.cmake
    cmake --build build
  2. Run the executable and see the printed version of opencv:

    ./build/test

The full output:

zz@Legion-R7000P% ./build/test 
OpenCV: 
General configuration for OpenCV 4.8.0 =====================================
  Version control:               unknown

  Platform:
    Timestamp:                   2023-09-23T05:09:47Z
    Host:                        Linux 5.15.0-84-generic x86_64
    CMake:                       3.27.4
    CMake generator:             Ninja
    CMake build tool:            /home/zz/work/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja
    Configuration:               Debug

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (14 files):         + SSSE3 SSE4_1
      SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (7 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (33 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
      AVX512_SKX (5 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

  C/C++:
    Built as dynamic libs?:      NO
    C++ standard:                11
    C++ Compiler:                /usr/bin/clang++  (ver 15.0.7)
    C++ flags (Release):         -fPIC   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG -g1
    C++ flags (Debug):           -fPIC   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/clang
    C flags (Release):           -fPIC   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG -g1
    C flags (Debug):             -fPIC   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  
    Linker flags (Debug):        -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  
    ccache:                      NO
    Precompiled headers:         NO
    Extra dependencies:          va va-drm protobuf::libprotobuf quirc::quirc dl m pthread rt
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann highgui imgcodecs imgproc ml objdetect photo stitching video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 gapi java python2 python3 ts
    Applications:                -
    Documentation:               NO
    Non-free algorithms:         NO

  GUI:                           GTK3
    GTK+:                        YES (ver 3.24.38)
      GThread :                  YES (ver 2.76.5)
      GtkGlExt:                  NO

  Media I/O: 
    ZLib:                        optimized /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/lib/libz.a debug /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/debug/lib/libz.a (ver 1.3.0)
    JPEG:                        optimized /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/lib/libjpeg.a debug /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/debug/lib/libjpeg.a (ver 62)
    WEBP:                        (ver 1.3.2)
    PNG:                         optimized /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/lib/libpng16.a debug /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/debug/lib/libpng16d.a (ver 1.6.39)
    TIFF:                        optimized /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/lib/libtiff.a debug /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/debug/lib/libtiffd.a (ver 42 / 4.5.1)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            pthreads

  Trace:                         YES (built-in)

  Other third-party libraries:
    VA:                          YES
    Custom HAL:                  NO
    Protobuf:                    optimized /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/lib/libprotobuf.a debug /home/zz/work/cv.app/video_to_ascii/vcpkg_installed/x64-linux/debug/lib/libprotobufd.a   version (3.21.12.0)
    Flatbuffers:                 23.5.26

  OpenCL:                        YES (INTELVA)
    Include path:                /home/zz/work/vcpkg/buildtrees/opencv4/src/4.8.0-8224011a81.clean/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python (for build):            NO

  Install to:                    /home/zz/work/vcpkg/packages/opencv4_x64-linux/debug
-----------------------------------------------------------------
zchrissirhcz commented 1 year ago

The output of cmake --build build:

zz@Legion-R7000P% cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$HOME/work/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build
-- Running vcpkg install
Detecting compiler hash for triplet x64-linux...
The following packages will be built and installed:
  * at-spi2-atk:x64-linux -> 2.38.0 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/at-spi2-atk/ebb28a9cdbd06d3185ba2e0cfc1945be23a0a608
  * at-spi2-core:x64-linux -> 2.44.1#2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/at-spi2-core/897df7693a8a1addc3a5ab84efabef89e4cef1d8
  * atk:x64-linux -> 2.38.0#8 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/atk/c97f8dd9d133fb3e75abf33040b3ec61e032734d
  * brotli:x64-linux -> 1.0.9#5 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/brotli/32ea6c4b0d18fa3172ad52147599983acc71d748
  * bzip2[core,tool]:x64-linux -> 1.0.8#5 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/bzip2/92e9a8bbf1abbd89872b48ad82fcf75852de1006
  * cairo[core,fontconfig,freetype,gobject,x11]:x64-linux -> 1.17.8#4 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/cairo/127eefeeba4725293adb6ea574b7bad98c845298
  * dirent:x64-linux -> 1.23.2#3 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/dirent/6df6238f6f97735c39e2e9b19d90f3895c4a636b
  * egl-registry:x64-linux -> 2022-09-20 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/egl-registry/e596b6c29ad16da764aab6f2fef830a3a884f14b
  * expat:x64-linux -> 2.5.0#3 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/expat/9a1bc114edd74892d292c799e7b45b407f2a0b8b
  * flatbuffers:x64-linux -> 23.5.26 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/flatbuffers/5146d5516c8570263780a1cdf73df98d70936e07
  * fontconfig:x64-linux -> 2.14.2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/fontconfig/26490bc4c9aa1377da98980ba6e1089525fdaa55
  * freetype[brotli,bzip2,core,png,zlib]:x64-linux -> 2.12.1#3 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/freetype/db92ea87ff12339808263710675221df6a06ac15
  * fribidi:x64-linux -> 1.0.12#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/fribidi/b611119763d80fa18b07cf2e3c99c02069b0ec55
  * gdk-pixbuf:x64-linux -> 2.42.10#2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/gdk-pixbuf/3dc0bb4b0113c8043f2ed716694303d1bdc08d88
  * getopt:x64-linux -> 0#3 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/getopt/ba541c1ce4012fae6dfdf34021b03d7253235b24
  * gettext[core,tools]:x64-linux -> 0.21.1#3 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/gettext/20e8e3535959bba6066d8887bb1c95e622d86f5a
  * gettext-libintl:x64-linux -> 0.21.1#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/gettext-libintl/25450f3473f6c62f28af9702a772d8b48a6170b7
  * glib:x64-linux -> 2.76.5 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/glib/4ae4475a91c8ec7f156e5904da9f0c3f02224cdc
  * gperf:x64-linux -> 3.1#6 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/gperf/590e19515bff5b0abc6d9f73ba20a19a71555a32
  * gtk3:x64-linux -> 3.24.38#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/gtk3/1362bb3978886e043fd12c089f2c1337a4f1adf8
  * harfbuzz:x64-linux -> 8.2.0#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/harfbuzz/053b71e591f5599aa5e887fbf6531c7baa58b23d
  * libepoxy:x64-linux -> 1.5.10#2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libepoxy/df7389605ff392a312b77b633ca658167c14221a
  * libffi:x64-linux -> 3.4.4#5 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libffi/db85488447cfda7bcc5e08452d8581ac0295b4c9
  * libiconv:x64-linux -> 1.17#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libiconv/4226589d5d658f4d96df83f8539de54dc57a5996
  * libjpeg-turbo:x64-linux -> 3.0.0#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libjpeg-turbo/91d431c26902a8c0b21e7956caa136093b7d7d6b
  * liblzma:x64-linux -> 5.4.3#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/liblzma/3f97f6a0904a3add9c3273f8ab1993902d75d5ef
  * libpng:x64-linux -> 1.6.39#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libpng/af144fe56e6e4c08cd8089d2e1dd46bae60a5062
  * libuuid:x64-linux -> 1.0.3#14 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libuuid/09be6774f518692bc418aa03623cc9dbc19e6516
  * libwebp[core,libwebpmux,nearlossless,simd]:x64-linux -> 1.3.2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libwebp/0b981028589375097039d5e39e7d87659cdfa824
  * libxml2[core,iconv,lzma,zlib]:x64-linux -> 2.11.5#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/libxml2/5ce0144d5c48f5140af55d0fbb58396b955d87a3
  * lzo:x64-linux -> 2.10#9 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/lzo/fcd8844a4e80d418bf894cf93a0453f067e404de
    opencv[core,default-features]:x64-linux -> 4.7.0 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/opencv/562bbf3bc1027e73456d71a10020ba984eec0eb1
  * opencv4[core,default-features,dnn,gtk,jpeg,png,quirc,tiff,webp]:x64-linux -> 4.8.0#6 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/opencv4/6a1280a0a3854032ba4ae9172b509ce46f81795f
  * pango:x64-linux -> 1.50.14#4 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/pango/e2a88ce998fab5ed3f3a2edf817f32734c78187b
  * pcre2[core,jit,platform-default-features]:x64-linux -> 10.42#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/pcre2/678c2336c4102c5a8868570c60140fdc2a8d1dcf
  * pixman:x64-linux -> 0.42.2#2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/pixman/a51c895edc5dd8067f51b600d631a5e8b32a65e8
  * protobuf:x64-linux -> 3.21.12 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/protobuf/3b145508ba614fe26989b23f6317f15bf6467be4
  * pthread:x64-linux -> 3.0.0#2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/pthread/e32a8cb12153277234e7c7e04322bdf90580659a
  * pthreads:x64-linux -> 3.0.0#14 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/pthreads/2e0a6df2800d3677b941dc6504f083965b7886d9
  * quirc:x64-linux -> 1.1#3 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/quirc/85b17d675bbbb05448d16af79d434bc5fca51f7b
  * tiff[core,jpeg,lzma,zip]:x64-linux -> 4.5.1#2 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/tiff/68f4ecc87b5ddce6c328c0f600a4c8b81d967d4c
  * vcpkg-cmake:x64-linux -> 2023-05-04 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/vcpkg-cmake/88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a
  * vcpkg-cmake-config:x64-linux -> 2022-02-06#1 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/vcpkg-cmake-config/8d54cc4f487d51b655abec5f9c9c3f86ca83311f
  * vcpkg-cmake-get-vars:x64-linux -> 2023-03-02 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/vcpkg-cmake-get-vars/2e624c2cf12a97a7a802e31ff1d28b9fa6ba9bde
  * vcpkg-get-python-packages:x64-linux -> 2023-07-28 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/vcpkg-get-python-packages/80e0cf9d38d72126b34eb1ee9b33f936c778a696
  * vcpkg-tool-meson:x64-linux -> 0.63 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/vcpkg-tool-meson/bee0cb6c5edf45133ebc9643b86c9c775ab36cfe
  * zlib:x64-linux -> 1.3 -- /home/zz/work/vcpkg/buildtrees/versioning_/versions/zlib/5ac18c6e6e3e2bf5a9e3d0bc8a845f198e4c4e05
Additional packages (*) will be modified to complete this operation.
Restored 47 package(s) from /home/zz/.cache/vcpkg/archives in 7.4 s. Use --debug to see more details.
Installing 1/47 vcpkg-cmake-config:x64-linux...
Elapsed time to handle vcpkg-cmake-config:x64-linux: 287 us
Installing 2/47 vcpkg-cmake:x64-linux...
Elapsed time to handle vcpkg-cmake:x64-linux: 195 us
Installing 3/47 libwebp:x64-linux...
Elapsed time to handle libwebp:x64-linux: 675 us
Installing 4/47 zlib:x64-linux...
Elapsed time to handle zlib:x64-linux: 288 us
Installing 5/47 liblzma:x64-linux...
Elapsed time to handle liblzma:x64-linux: 402 us
Installing 6/47 libjpeg-turbo:x64-linux...
Elapsed time to handle libjpeg-turbo:x64-linux: 390 us
Installing 7/47 tiff:x64-linux...
Elapsed time to handle tiff:x64-linux: 466 us
Installing 8/47 quirc:x64-linux...
Elapsed time to handle quirc:x64-linux: 283 us
Installing 9/47 libpng:x64-linux...
Elapsed time to handle libpng:x64-linux: 492 us
Installing 10/47 vcpkg-tool-meson:x64-linux...
Elapsed time to handle vcpkg-tool-meson:x64-linux: 5.75 ms
Installing 11/47 bzip2:x64-linux...
Elapsed time to handle bzip2:x64-linux: 657 us
Installing 12/47 brotli:x64-linux...
Elapsed time to handle brotli:x64-linux: 707 us
Installing 13/47 freetype:x64-linux...
Elapsed time to handle freetype:x64-linux: 1.08 ms
Installing 14/47 harfbuzz:x64-linux...
Elapsed time to handle harfbuzz:x64-linux: 787 us
Installing 15/47 pcre2:x64-linux...
Elapsed time to handle pcre2:x64-linux: 792 us
Installing 16/47 libiconv:x64-linux...
Elapsed time to handle libiconv:x64-linux: 509 us
Installing 17/47 vcpkg-cmake-get-vars:x64-linux...
Elapsed time to handle vcpkg-cmake-get-vars:x64-linux: 533 us
Installing 18/47 libffi:x64-linux...
Elapsed time to handle libffi:x64-linux: 672 us
Installing 19/47 gettext-libintl:x64-linux...
Elapsed time to handle gettext-libintl:x64-linux: 541 us
Installing 20/47 gettext:x64-linux...
Elapsed time to handle gettext:x64-linux: 2.62 ms
Installing 21/47 dirent:x64-linux...
Elapsed time to handle dirent:x64-linux: 562 us
Installing 22/47 glib:x64-linux...
Elapsed time to handle glib:x64-linux: 6.81 ms
Installing 23/47 fribidi:x64-linux...
Elapsed time to handle fribidi:x64-linux: 970 us
Installing 24/47 pthreads:x64-linux...
Elapsed time to handle pthreads:x64-linux: 714 us
Installing 25/47 pthread:x64-linux...
Elapsed time to handle pthread:x64-linux: 719 us
Installing 26/47 libuuid:x64-linux...
Elapsed time to handle libuuid:x64-linux: 886 us
Installing 27/47 gperf:x64-linux...
Elapsed time to handle gperf:x64-linux: 763 us
Installing 28/47 getopt:x64-linux...
Elapsed time to handle getopt:x64-linux: 725 us
Installing 29/47 expat:x64-linux...
Elapsed time to handle expat:x64-linux: 878 us
Installing 30/47 fontconfig:x64-linux...
Elapsed time to handle fontconfig:x64-linux: 1.5 ms
Installing 31/47 pixman:x64-linux...
Elapsed time to handle pixman:x64-linux: 891 us
Installing 32/47 lzo:x64-linux...
Elapsed time to handle lzo:x64-linux: 993 us
Installing 33/47 cairo:x64-linux...
Elapsed time to handle cairo:x64-linux: 1.33 ms
Installing 34/47 pango:x64-linux...
Elapsed time to handle pango:x64-linux: 1.37 ms
Installing 35/47 egl-registry:x64-linux...
Elapsed time to handle egl-registry:x64-linux: 883 us
Installing 36/47 libepoxy:x64-linux...
Elapsed time to handle libepoxy:x64-linux: 965 us
Installing 37/47 gdk-pixbuf:x64-linux...
Elapsed time to handle gdk-pixbuf:x64-linux: 4.65 ms
Installing 38/47 atk:x64-linux...
Elapsed time to handle atk:x64-linux: 4.26 ms
Installing 39/47 libxml2:x64-linux...
Elapsed time to handle libxml2:x64-linux: 1.99 ms
Installing 40/47 at-spi2-core:x64-linux...
Elapsed time to handle at-spi2-core:x64-linux: 3.86 ms
Installing 41/47 at-spi2-atk:x64-linux...
Elapsed time to handle at-spi2-atk:x64-linux: 1.28 ms
Installing 42/47 gtk3:x64-linux...
Elapsed time to handle gtk3:x64-linux: 8.06 ms
Installing 43/47 protobuf:x64-linux...
Elapsed time to handle protobuf:x64-linux: 2.58 ms
Installing 44/47 flatbuffers:x64-linux...
Elapsed time to handle flatbuffers:x64-linux: 1.63 ms
Installing 45/47 vcpkg-get-python-packages:x64-linux...
Elapsed time to handle vcpkg-get-python-packages:x64-linux: 1.25 ms
Installing 46/47 opencv4:x64-linux...
Elapsed time to handle opencv4:x64-linux: 4.24 ms
Installing 47/47 opencv:x64-linux...
Elapsed time to handle opencv:x64-linux: 1.5 ms
Total install time: 74.6 ms
opencv provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(OpenCV CONFIG REQUIRED)
    # note: 15 additional targets are not displayed.
    target_link_libraries(main PRIVATE opencv_ml opencv_dnn opencv_core opencv_flann)

-- Running vcpkg install - done
-- The C compiler identification is Clang 15.0.7
-- The CXX compiler identification is Clang 15.0.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Protobuf: /home/zz/work/cv.app/video_to_ascii/build/vcpkg_installed/x64-linux/tools/protobuf/protoc (found version "3.21.12.0") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found TIFF: /home/zz/work/cv.app/video_to_ascii/build/vcpkg_installed/x64-linux/lib/libtiff.a (found version "4.5.1")  
-- Found LibLZMA: /home/zz/work/cv.app/video_to_ascii/build/vcpkg_installed/x64-linux/lib/liblzma.a (found version "5.4.3") 
-- Found JPEG: /home/zz/work/cv.app/video_to_ascii/build/vcpkg_installed/x64-linux/lib/libjpeg.a (found version "62") 
-- Found ZLIB: /home/zz/work/cv.app/video_to_ascii/build/vcpkg_installed/x64-linux/lib/libz.a (found version "1.3.0")  
-- Found OpenCV: /home/zz/work/cv.app/video_to_ascii/build/vcpkg_installed/x64-linux (found version "4.8.0") 
-- Configuring done (8.8s)
-- Generating done (0.0s)
-- Build files have been written to: /home/zz/work/cv.app/video_to_ascii/build
[ 50%] Building CXX object CMakeFiles/test.dir/test.cpp.o
[100%] Linking CXX executable test
[100%] Built target test
dg0yt commented 1 year ago

You must override opencv4, not opencv.

zchrissirhcz commented 1 year ago

You must override opencv4, not opencv.

What's the difference between opencv and opencv4? If opencv is not correct, what about deleting it in search result, or report an error when building? They made people confuse and easy to use the wrong one.

@dg0yt

dg0yt commented 1 year ago

In vcpkg, opencv is an empty port which pulls in opencv4. I guess it is meant to allow users to switch easily to opencv3 or opencv2 by providing an override port for opencv. The port's description could make it more obvious....

github-actions[bot] commented 12 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.