2008-07-04 16:10:47 +04:00
/*
-----BEGIN QCMOD-----
name: libtorrent-rasterbar
-----END QCMOD-----
*/
2009-01-18 18:12:38 +03:00
// see Conf::findPkgConfig
2008-07-04 16:10:47 +04:00
class qc_libtorrent_rasterbar : public ConfObj
{
public:
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
2010-01-18 20:10:25 +03:00
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
2008-07-04 16:10:47 +04:00
QString shortname() const { return "libtorrent-rasterbar"; }
bool exec(){
2009-08-02 10:33:43 +04:00
QStringList incs;
2010-01-18 20:10:25 +03:00
QString req_ver = "0.14.4";
2009-11-18 13:29:20 +03:00
QString adv_ver = "0.15.0";
2009-08-02 10:33:43 +04:00
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]);
2010-02-09 15:01:13 +03:00
//if(!libs.isEmpty())
// conf->addLib(libs);
2010-04-07 13:06:11 +04:00
if(conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other)) {
//printf("\nWarning: libtorrent-rasterbar v%s was detected. Some feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
//else
2009-11-18 13:29:20 +03:00
conf->addDefine("LIBTORRENT_0_15");
2010-04-07 13:06:11 +04:00
}
2010-02-09 15:01:13 +03:00
// Get linking parameters
2010-03-30 15:35:20 +04:00
//QStringList params;
//QByteArray staticlibs;
//params << "--static" << "--libs" << "libtorrent-rasterbar";
//conf->doCommand("pkg-config", params, &staticlibs);
//conf->addLib(staticlibs.trimmed());
//libcrypto
conf->addLib("-lcrypto");
2008-07-04 16:10:47 +04:00
return true;
}
};