mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 18:47:37 -07:00
- Added configure parameter :
--with-libtorrent-lib=[path] Path to libtorrent library files
This commit is contained in:
parent
572d4013e7
commit
8f9a37ee2f
2 changed files with 52 additions and 14 deletions
|
@ -2,6 +2,7 @@
|
|||
-----BEGIN QCMOD-----
|
||||
name: libtorrent
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libtorrent : public ConfObj
|
||||
|
@ -19,18 +20,32 @@ public:
|
|||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
return true;
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
sl += "/sw/include";
|
||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", sl, &s)) {
|
||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", QStringList(), &s)) {
|
||||
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent")) {
|
||||
qWarning("libtorrent library not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
if(!conf->findLibrary("torrent", &s)) {
|
||||
qWarning("libtorrent library not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-ltorrent");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue