It looks like it is already built. I presume you’re asking how to use it.
Method 2 is what I’d recommend though munging with the environment is unnecessary; just set OpenCV_DIR in the UI or pass it on the command line. VS2019 shouldn’t be any different than anything else.
CMake doesn’t really provide much help for PATH itself. You can discover DLLs with file(GET_RUNTIME_DEPENDENCIES), the $<TARGET_RUNTIME_DLLS> genex, or by crafting PATH as needed manually.
I already test it for some days.But I dont find any tutorial for cmake project to assign lib path. I always get the answer that you can use vcpkg.
If you know how to assign it with vs2019, thank you a lot.
I think VS2019 probably has somewhere in its property panels to add PATH entries when using the Run menu, but I don’t use it enough to be of much guidance beyond that, sorry.