Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 67 lines (60 sloc) 1.64 kb
bc16246 @remko Separating Google FT from Jingle.
remko authored
1 /*
2 -----BEGIN QCMOD-----
3 name: Google File Transfer
4 arg: enable-google-ft,Enable Google File Transfer support
5 arg: with-expat-inc=[path],Path to Expat include files (for Google)
6 arg: with-expat-lib=[path],Path to Expat library files (for Google)
7 -----END QCMOD-----
8 */
9
10 //----------------------------------------------------------------------------
11 // qc_google_ft
12 //----------------------------------------------------------------------------
13 class qc_google_ft : public ConfObj
14 {
15 public:
16 qc_google_ft(Conf *c) : ConfObj(c) {}
17 QString name() const { return "Google File Transfer"; }
18 QString shortname() const { return "GoogleFT"; }
19 bool exec()
20 {
21 QString s = conf->getenv("QC_ENABLE_GOOGLE_FT");
22 if(s.isEmpty())
23 return false;
24
25 // Expat
26 s = conf->getenv("QC_WITH_EXPAT_INC");
27 if(!s.isEmpty()) {
28 if(!conf->checkHeader(s, "expat.h")) {
29 qWarning("Expat includes not found!");
30 return false;
31 }
32 conf->addIncludePath(s);
33 }
34 else {
35 if(!conf->findHeader("expat.h", QStringList(), &s)) {
36 qWarning("Expat includes not found!");
37 return false;
38 }
39 conf->addIncludePath(s);
40 }
41
42 s = conf->getenv("QC_WITH_EXPAT_LIB");
43 if(!s.isEmpty()) {
44 if(!conf->checkLibrary(s, "expat")) {
45 qWarning("Expat library not found!");
46 return false;
47 }
48 conf->addLib(QString("-L") + s);
49 }
50 else {
51 if(!conf->findLibrary("expat", &s)) {
52 qWarning("Expat library not found!");
53 return false;
54 }
55 if (!s.isEmpty())
56 conf->addLib(QString("-L") + s);
57 }
58
59 conf->addLib("-lexpat");
60
61 // Finish
62 conf->addExtra("CONFIG += google_ft");
63
64 return true;
65 }
66 };
Something went wrong with that request. Please try again.