The main general steps, see the following link
https://blog.csdn.net/sinat_36264666/article/details/73200739
The key configuration is as follows:
1, when adding environment variables, adding attention to the following three:
2, the configuration of the compiling cmake-gui:
Check WITH_OPENGL
check WITH_QT
check ENABLE_CXX11
Uncheck ENABLE_PRECOMPILED_HEADERS (disable precompiled headers)
do not check WITH_IPP
uncheck WITH_MSMF
uncheck WITH_OPENCL_D3D11_NV