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.--