我正在尝试在JetBrains的Clion中开始编写我的Qt项目,但首先需要在我的Cmake文件中链接一些库。当尝试查找像Qt5Core、Qt5Widgets、Qt5Gui这样的包时没有问题,但是当尝试查找Qt5Charts时会抛出错误:
By not providing "FindQt5Charts.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Charts", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Charts" with any of the following names:
Qt5ChartsConfig.cmake qt5charts-config.cmake
Add the installation prefix of "Qt5Charts" to CMAKE_PREFIX_PATH or set "Qt5Charts_DIR" to a directory containing one of the above files. If "Qt5Charts" provides a separate development package or SDK, be sure it has been installed.
所有的软件包都是通过Qt的Linux(Ubuntu)维护工具安装的。 有什么想法可以帮助CMake找到Charts模块吗?
QT_CHARTS_USE_NAMESPACE
... - Vladimir Bershov.pro
文件中添加了QT += charts
? - Vladimir Bershov