Excerpt from vcpkg\buildtrees\opencv\config-x64-windows-out.log
....
-- General configuration for OpenCV 3.4.3 =====================================
-- Version control: 9ffac4d5
--
-- Extra modules:
-- Location (extra): D:/DEVELOPMENT/vcpkg/buildtrees/opencv/src/3.4.3-98dbf13329/modules
-- Version control (extra): 9ffac4d5
--
-- Platform:
-- Timestamp: 2019-05-29T11:59:48Z
-- Host: Windows 10.0.17134 AMD64
-- CMake: 3.14.0
-- CMake generator: Ninja
-- CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe
-- MSVC: 1921
-- Configuration: Release
...
However, the mentioned commit 9ffac4d5 is not present in the opencv repository:
https://github.com/opencv/opencv/tree/9ffac4d5
The official commit of 3.4.3 is b38c50b :
https://github.com/opencv/opencv/releases/tag/3.4.3
Was the port somehow tampered with?
The output is not reliable, now It gives me another (different, albeit non-existing commit):
General configuration for OpenCV 3.4.3 =====================================
Version control: 046f8383
Extra modules:
Location (extra): D:/DEVELOPMENT/vcpkg/buildtrees/opencv/src/3.4.3-98dbf13329/modules
Version control (extra): 046f8383
Platform:
Timestamp: 2019-06-01T10:52:47Z
Host: Windows 10.0.17134 AMD64
CMake: 3.14.4
CMake generator: Ninja
CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe
MSVC: 1921
Configuration: Release
CPU/HW features:
These are vcpkg commit hashes you are seeing.
OpenCV tries to be clever while determining its "version" and fails at that. I've seen similar behavior in other GitHub repositories (e.g. AWS SDK for C++) -- whenever they are extracted from a release archive in other repository's tree (with vcpkg it's buildtrees subdirectory), their versioning scripts erroneously pick container repository's git info.
Here's where they are determining version control string:
https://github.com/opencv/opencv/blob/3.4.3/CMakeLists.txt#L527-L537
And here's how they are doing it:
https://github.com/opencv/opencv/blob/3.4.3/cmake/OpenCVUtils.cmake#L1625-L1659
IMO the procedure should be improved in similar manner to how it was done in AWS SDK for C++.
There is no "git" information available from unpacked archives.
Try to add here something like:
-DOPENCV_VCSVERSION=vcpkg-${OPENCV_VCSVERSION}
Unfortunately, there is no similar way to workaround opencv_contrib git hashes (they are not collected from the git-"rooted" path in general, so proposed above workaround doesn't work at all even without vcpkg):
BUILD_INFO_SKIP_EXTRA_MODULES=ONCMAKE_DISABLE_FIND_PACKAGE_Git=ON (should work if it is new "CMake" process)