使用Qt编译第三方库

时间:2016-06-03 23:34:05

标签: qt opencv marble

我一直在使用OpenCV和Marble库编译并与Qt链接。每次我这样做,我都有运行cmake来制作这些库的问题。似乎qt cmake文件中的路径到其他qt cmake文件是不正确的。我得到的错误如下:

CMake Error at CMakeLists.txt:67 (find_package):
By not providing "FindQt5DBus.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5DBus", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5DBus" with any
of the following names:

Qt5DBusConfig.cmake
qt5dbus-config.cmake

Add the installation prefix of "Qt5DBus" to CMAKE_PREFIX_PATH or set
"Qt5DBus_DIR" to a directory containing one of the above files.  If
"Qt5DBus" provides a separate development package or SDK, be sure it has
been installed.

我可以通过运行

在Ubuntu中修复此问题
sudo apt-get install qt5-default

这在Ubuntu中很好,但现在我正在尝试在mac和windows上编译这些库。任何人都知道如何获得所有这些路径的Qt已经正确吗?在Windows和Mac上尝试了安装程序,并在mac上进行了brew。我没有时间去逐一修复这些错误

1 个答案:

答案 0 :(得分:0)

Windows上至少Qt 5.5(使用Qt安装程序)应该开箱即用。它包含DBus。你目前使用哪个Qt版本?