mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
- Added configure parameter :
--with-libtorrent-lib=[path] Path to libtorrent library files
This commit is contained in:
parent
572d4013e7
commit
8f9a37ee2f
37
configure
vendored
37
configure
vendored
@ -19,6 +19,7 @@ Main options:
|
|||||||
|
|
||||||
Dependency options:
|
Dependency options:
|
||||||
--with-libtorrent-inc=[path] Path to libtorrent include files
|
--with-libtorrent-inc=[path] Path to libtorrent include files
|
||||||
|
--with-libtorrent-lib=[path] Path to libtorrent library files
|
||||||
--with-libcurl-inc=[path] Path to libcurl include files
|
--with-libcurl-inc=[path] Path to libcurl include files
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
@ -141,6 +142,11 @@ while [ $# -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--with-libtorrent-lib=*)
|
||||||
|
QC_WITH_LIBTORRENT_LIB=$optarg
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
--with-libcurl-inc=*)
|
--with-libcurl-inc=*)
|
||||||
QC_WITH_LIBCURL_INC=$optarg
|
QC_WITH_LIBCURL_INC=$optarg
|
||||||
shift
|
shift
|
||||||
@ -168,6 +174,7 @@ 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 QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||||
|
echo QC_WITH_LIBTORRENT_LIB=$QC_WITH_LIBTORRENT_LIB
|
||||||
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
@ -267,6 +274,7 @@ public:
|
|||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libtorrent
|
name: libtorrent
|
||||||
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
||||||
|
arg: with-libtorrent-lib=[path], Path to libtorrent library files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_libtorrent : public ConfObj
|
class qc_libtorrent : public ConfObj
|
||||||
@ -284,19 +292,33 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
conf->addIncludePath(s);
|
conf->addIncludePath(s);
|
||||||
return true;
|
|
||||||
}else{
|
}else{
|
||||||
QStringList sl;
|
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", QStringList(), &s)) {
|
||||||
sl += "/usr/include";
|
|
||||||
sl += "/usr/local/include";
|
|
||||||
sl += "/sw/include";
|
|
||||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", sl, &s)) {
|
|
||||||
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
conf->addIncludePath(s);
|
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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#line 1 "libboost.qcm"
|
#line 1 "libboost.qcm"
|
||||||
@ -1342,6 +1364,7 @@ export BINDIR
|
|||||||
export DATADIR
|
export DATADIR
|
||||||
export EX_QTDIR
|
export EX_QTDIR
|
||||||
export QC_WITH_LIBTORRENT_INC
|
export QC_WITH_LIBTORRENT_INC
|
||||||
|
export QC_WITH_LIBTORRENT_LIB
|
||||||
export QC_WITH_LIBCURL_INC
|
export QC_WITH_LIBCURL_INC
|
||||||
export QC_DEBUG
|
export QC_DEBUG
|
||||||
rm -rf .qconftemp
|
rm -rf .qconftemp
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libtorrent
|
name: libtorrent
|
||||||
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
||||||
|
arg: with-libtorrent-lib=[path], Path to libtorrent library files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_libtorrent : public ConfObj
|
class qc_libtorrent : public ConfObj
|
||||||
@ -19,18 +20,32 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
conf->addIncludePath(s);
|
conf->addIncludePath(s);
|
||||||
return true;
|
|
||||||
}else{
|
}else{
|
||||||
QStringList sl;
|
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", QStringList(), &s)) {
|
||||||
sl += "/usr/include";
|
|
||||||
sl += "/usr/local/include";
|
|
||||||
sl += "/sw/include";
|
|
||||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", sl, &s)) {
|
|
||||||
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
conf->addIncludePath(s);
|
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…
x
Reference in New Issue
Block a user