qBittorrent/qcm/libtorrent-rasterbar.qcm
Christophe Dumez 4ca2d060ea - Make everything compile back with libtorrent v0.14
- Fix crash in search engine destructor if downloads are running
2009-11-18 10:29:20 +00:00

31 lines
1.1 KiB
Text

/*
-----BEGIN QCMOD-----
name: libtorrent-rasterbar
-----END QCMOD-----
*/
// see Conf::findPkgConfig
class qc_libtorrent_rasterbar : public ConfObj
{
public:
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.15.0 advised)"; }
QString shortname() const { return "libtorrent-rasterbar"; }
bool exec(){
QStringList incs;
QString req_ver = "0.14.0";
QString adv_ver = "0.15.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
return false;
for(int n = 0; n < incs.count(); ++n)
conf->addIncludePath(incs[n]);
if(!libs.isEmpty())
conf->addLib(libs);
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other))
printf("\nWarning: libtorrent-rasterbar v%s was detected.\nAlthough it will compile and run, you will be missing some features. Please consider updating to v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
else
conf->addDefine("LIBTORRENT_0_15");
return true;
}
};