mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 10:37:06 -07:00
- qConf is buggy and the configure file was not working properly. I had to rewrite most of the configure code to get it working.
This commit is contained in:
parent
2f0bee3b19
commit
732cc41be4
3 changed files with 126 additions and 95 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libboost
|
||||
arg: with-libboost-inc=[path], Path to libboost include files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libboost : public ConfObj
|
||||
|
@ -10,31 +11,46 @@ public:
|
|||
QString name() const { return "libboost"; }
|
||||
QString shortname() const { return "libboost"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
sl += "/sw/include";
|
||||
if(!conf->findHeader("boost/format.hpp", sl, &s)) {
|
||||
qWarning("libboost includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
if(!conf->findHeader("boost/date_time/posix_time/posix_time.hpp", sl, &s)) {
|
||||
qWarning("libboost-date-time includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
if(!conf->findHeader("boost/filesystem/path.hpp", sl, &s)) {
|
||||
qWarning("libboost-filesystem includes not found!");
|
||||
return false;
|
||||
}
|
||||
if(!conf->findHeader("boost/thread.hpp", sl, &s)) {
|
||||
qWarning("libboost-thread includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
return true;
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue