Qt6构建时出现opengl测试错误问题
在没有安装opengl相关库时进行Qt6构建时会出现构建失败的错误:
ERROR: The OpenGL functionality tests failed! You might need to modify the OpenGL package search path by setting the OpenGL_DIR CMake variable to the OpenGL library's installation directory.
在不想安装opengl相关库的情况下,需要在构建时通过禁用opengl功能来让构建过程中的opengl相关测试跳过。具体是在构建时添加INPUT_opengl=no选项:
//在源码路径下的build文件夹进行构建
cmake -DINPUT_opengl=no ..
构建时的可以设置的选项在Qt6源码的cmake/configure-cmake-mapping.md文件中提供,可以参考该文件进行定制化构建Qt相关模块功能。

浙公网安备 33010602011771号