mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 14:12:30 -06:00
- Upgraded to libtorrent svn (0.13)
This commit is contained in:
@@ -9,13 +9,13 @@ class qc_libtorrent : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent >= 0.12"; }
|
||||
QString name() const { return "libtorrent >= 0.13"; }
|
||||
QString shortname() const { return "libtorrent"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")) {
|
||||
if(!conf->checkHeader(s, "libtorrent/lsd.hpp")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")){
|
||||
if(conf->checkHeader(s, "libtorrent/lsd.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libupnp
|
||||
arg: disable-upnp, disable UPnP support
|
||||
arg: with-libupnp-inc=[path], Path to libupnp include files
|
||||
arg: with-libupnp-lib=[path], Path to libupnp library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libupnp : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libupnp(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libupnp"; }
|
||||
QString shortname() const { return "libupnp"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_DISABLE_UPNP");
|
||||
if(!s.isEmpty()){
|
||||
conf->addDefine("NO_UPNP");
|
||||
return false;
|
||||
}
|
||||
s = conf->getenv("QC_WITH_LIBUPNP_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "upnp/upnp.h")) {
|
||||
//qWarning("libupnp includes not found!");
|
||||
conf->addDefine("NO_UPNP");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
if(!conf->findHeader("upnp/upnp.h", sl, &s)) {
|
||||
//qWarning("libupnp includes not found!");
|
||||
conf->addDefine("NO_UPNP");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBUPNP_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "upnp")) {
|
||||
qWarning("libupnp library not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
if(!conf->findLibrary("upnp", &s)) {
|
||||
qWarning("libupnp library not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lupnp");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user