mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 21:38:51 +03:00
Added a new parameter to configure file :
--with-libtorrent-inc=[path] Path to libtorrent include files
This commit is contained in:
parent
eac0254744
commit
3c28c04b40
2 changed files with 52 additions and 20 deletions
21
configure
vendored
21
configure
vendored
|
@ -17,6 +17,9 @@ Main options:
|
||||||
--verbose Show extra configure output.
|
--verbose Show extra configure output.
|
||||||
--help This help text.
|
--help This help text.
|
||||||
|
|
||||||
|
Dependency options:
|
||||||
|
--with-libtorrent-inc=[path] Path to libtorrent include files
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +135,11 @@ while [ $# -gt 0 ]; do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--with-libtorrent-inc=*)
|
||||||
|
QC_WITH_LIBTORRENT_INC=$optarg
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
--verbose)
|
--verbose)
|
||||||
QC_DEBUG="Y"
|
QC_DEBUG="Y"
|
||||||
shift
|
shift
|
||||||
|
@ -153,6 +161,7 @@ echo PREFIX=$PREFIX
|
||||||
echo BINDIR=$BINDIR
|
echo BINDIR=$BINDIR
|
||||||
echo DATADIR=$DATADIR
|
echo DATADIR=$DATADIR
|
||||||
echo EX_QTDIR=$EX_QTDIR
|
echo EX_QTDIR=$EX_QTDIR
|
||||||
|
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -250,6 +259,7 @@ public:
|
||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libtorrent
|
name: libtorrent
|
||||||
|
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_libtorrent : public ConfObj
|
class qc_libtorrent : public ConfObj
|
||||||
|
@ -260,6 +270,15 @@ public:
|
||||||
QString shortname() const { return "libtorrent"; }
|
QString shortname() const { return "libtorrent"; }
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QString s;
|
QString s;
|
||||||
|
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")) {
|
||||||
|
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
QStringList sl;
|
QStringList sl;
|
||||||
sl += "/usr/include";
|
sl += "/usr/include";
|
||||||
sl += "/usr/local/include";
|
sl += "/usr/local/include";
|
||||||
|
@ -271,6 +290,7 @@ public:
|
||||||
conf->addIncludePath(s);
|
conf->addIncludePath(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
#line 1 "libboost.qcm"
|
#line 1 "libboost.qcm"
|
||||||
/*
|
/*
|
||||||
|
@ -1303,6 +1323,7 @@ export PREFIX
|
||||||
export BINDIR
|
export BINDIR
|
||||||
export DATADIR
|
export DATADIR
|
||||||
export EX_QTDIR
|
export EX_QTDIR
|
||||||
|
export QC_WITH_LIBTORRENT_INC
|
||||||
export QC_DEBUG
|
export QC_DEBUG
|
||||||
rm -rf .qconftemp
|
rm -rf .qconftemp
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libtorrent
|
name: libtorrent
|
||||||
|
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_libtorrent : public ConfObj
|
class qc_libtorrent : public ConfObj
|
||||||
|
@ -11,6 +12,15 @@ public:
|
||||||
QString shortname() const { return "libtorrent"; }
|
QString shortname() const { return "libtorrent"; }
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QString s;
|
QString s;
|
||||||
|
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")) {
|
||||||
|
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
QStringList sl;
|
QStringList sl;
|
||||||
sl += "/usr/include";
|
sl += "/usr/include";
|
||||||
sl += "/usr/local/include";
|
sl += "/usr/local/include";
|
||||||
|
@ -22,4 +32,5 @@ public:
|
||||||
conf->addIncludePath(s);
|
conf->addIncludePath(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue