mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Make QtDBus dependency optional
This commit is contained in:
parent
82e41f36ee
commit
b6c3189fe3
11 changed files with 115 additions and 35 deletions
31
qcm/qt-dbus.qcm
Normal file
31
qcm/qt-dbus.qcm
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: qt-dbus
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
// see Conf::findPkgConfig
|
||||
class qc_qt_dbus : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_qt_dbus(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "QtDBus >= 4.5"; }
|
||||
QString shortname() const { return "qt-dbus"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_qt_dbus").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec(){
|
||||
if(!conf->getenv("QC_DISABLE_qt_dbus").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
||||
return false;
|
||||
QStringList incs;
|
||||
QString req_ver = "4.5.0";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
if(conf->findPkgConfig("QtDBus", mode, req_ver, &version, &incs, &libs, &other)) {
|
||||
conf->addExtra("CONFIG += dbus");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue