mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
56 lines
1.3 KiB
Text
56 lines
1.3 KiB
Text
/*
|
|
-----BEGIN QCMOD-----
|
|
name: libboost
|
|
arg: with-libboost-inc=[path], Path to libboost include files
|
|
-----END QCMOD-----
|
|
*/
|
|
class qc_libboost : public ConfObj
|
|
{
|
|
public:
|
|
qc_libboost(Conf *c) : ConfObj(c) {}
|
|
QString name() const { return "libboost"; }
|
|
QString shortname() const { return "libboost"; }
|
|
bool exec(){
|
|
QString s;
|
|
s = conf->getenv("QC_WITH_LIBBOOST_INC");
|
|
if(!s.isEmpty()) {
|
|
if(!conf->checkHeader(s, "boost/format.hpp")) {
|
|
return false;
|
|
}
|
|
if(!conf->checkHeader(s, "boost/date_time/posix_time/posix_time.hpp")) {
|
|
return false;
|
|
}
|
|
if(!conf->checkHeader(s, "boost/filesystem/path.hpp")) {
|
|
return false;
|
|
}
|
|
if(!conf->checkHeader(s, "boost/thread.hpp")) {
|
|
return false;
|
|
}
|
|
}else{
|
|
QStringList sl;
|
|
sl << "/usr/include";
|
|
sl << "/usr/local/include";
|
|
bool found = false;
|
|
foreach(s, sl){
|
|
if(conf->checkHeader(s, "boost/format.hpp")){
|
|
found = true;
|
|
break;
|
|
}
|
|
}
|
|
if(!found) {
|
|
return false;
|
|
}
|
|
if(!conf->checkHeader(s, "boost/date_time/posix_time/posix_time.hpp")) {
|
|
return false;
|
|
}
|
|
if(!conf->checkHeader(s, "boost/filesystem/path.hpp")) {
|
|
return false;
|
|
}
|
|
if(!conf->checkHeader(s, "boost/thread.hpp")) {
|
|
return false;
|
|
}
|
|
}
|
|
conf->addIncludePath(s);
|
|
return true;
|
|
}
|
|
};
|