![Cmake 找不到模块 Qt5WebEngineWidgets](https://linux22.com/image/8660/Cmake%20%E6%89%BE%E4%B8%8D%E5%88%B0%E6%A8%A1%E5%9D%97%20Qt5WebEngineWidgets.png)
我想编译 QSyncthingTray (https://github.com/sieren/QSyncthingTray)在我的笔记本上运行 arch linux x86。
我已将 $QTDIR 设置为
/home/user/.qt/5.5/gcc/
以及 $CMAKE_PREFIX_PATH
我什至将 $Qt5WebEngineWidgets_DIR 设置为
/home/user/.qt/5.5/gcc/lib/cmake/Qt5WebEngineWidgets
该目录存在并且所需的文件都在其中。
Cmake仍然错误
CMake Warning at /usr/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:326 (find_package):
Could not find a package configuration file provided by
"Qt5WebEngineWidgets" with any of the following names:
Qt5WebEngineWidgetsConfig.cmake
qt5webenginewidgets-config.cmake
Add the installation prefix of "Qt5WebEngineWidgets" to CMAKE_PREFIX_PATH or set "Qt5WebEngineWidgets_DIR" to a directory containing one of the above files. If "Qt5WebEngineWidgets" provides a separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:127 (qt5_use_modules)
CMake Error at /usr/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:328 (message):
Can not use "WebEngineWidgets" module which has not yet been found.
Call Stack (most recent call first):
CMakeLists.txt:127 (qt5_use_modules)
答案1
»» 无法使用尚未找到的“WebEngineWidgets”模块 ««
Qt5WebEngineWidgets
似乎由提供qtweb引擎-opensource-src-5.6.0.tar.xzhttps://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/
? 5.4 版本更容易构建? : qtwebengine-5.4.1 → qtwebengine-opensource-src-5.4.1.tar.xz ... 补丁 qtwebengine-opensource-src-5.4.0-gyp_conf.patch (和 .tar.xz)可以在以下位置找到qt5-qtwebengine-5.4.1-1.fc21.src.rpm
ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/devel%3A/cloverleaf%3A/testing%3A/frameworks/devel_cloverleaf_testing_Fedora_21/src/qt5-qtwebengine-5.4.1- 1.fc21.src.rpm
编辑:QSyncthingTray 只能使用 qtwebengine-5.6 构建。 v5.4 失败。
我找到了一个可以运行 qtwebengine-5.6 的操作系统:PCLinuxOS 2016 - 64bits → lib64qt5webengine-devel-5.6.0-2pclos2016
,并且 QSyncthingTray 在几秒钟内构建完成。