Some work about adaptive color scheme for Web UI (PR #19901) http://[316:c51a:62a3:8b9::4]/d4708/qBittorrent/src/branch/adaptive-webui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.4 KiB

/*
-----BEGIN QCMOD-----
name: libboost
arg: with-libboost-inc=[path], Path to libboost include files
arg: with-libboost-lib=[path], Path to libboost library 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);
// Find library
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
if(!s.isEmpty()) {
if(!conf->checkLibrary(s, "boost_system-mt")) {
return false;
}
}else{
QStringList sl;
sl << "/usr/lib/";
sl << "/usr/lib64/";
sl << "/usr/local/lib/";
sl << "/usr/local/lib64/";
bool found = false;
foreach(s, sl){
if(conf->checkLibrary(s, "boost_system-mt")) {
found = true;
break;
}
}
if(!found)
return false;
}
conf->addLib(QString("-L") + s);
conf->addLib("-lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt");
return true;
}
};