cmke project build fail with visual studio 2019

alice 21 Reputation points
2022-03-30T02:49:26.54+00:00

I have a project that use opencv
In the camkelist I use the find_package(OPENCV).
I have build a release version opencv.
How can I let the camkelist find the opencv with visual studio 2019

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,989 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,511 Reputation points
    2022-04-06T07:58:43.01+00:00

    Hello @alice

    We understand that you are using OpenCV in your project and you are trying to access the release version of OpenCV from CMakeLists.txt.

    CMake supports two files that allow users to specify common configure, build, and test options and share them with others: CMakePresets.json and CMakeUserPresets.json. Use these files to drive CMake in Visual Studio and Visual Studio Code, in a continuous integration (CI) pipeline, and from the command line. CMakeUserPresets.json is for developers to save their own local builds.

    For more information about integrating CMakeUserPresets, please verify following Microsoft documentation.

    https://learn.microsoft.com/en-us/cpp/build/cmake-presets-json-reference?view=msvc-170

    Hope this helps with your query. If you have any questions kindly get back to us.

    --
    --If the reply is helpful, please Upvote and Accept as answer.--

    0 comments No comments