Warning, /games/ksirk/ksirk/iris/qcm/extra.qcm is written in an unsupported language. File is not indexed.

0001 /*
0002 -----BEGIN QCMOD-----
0003 name: extra
0004 section: project
0005 arg: disable-tests,Don't build examples and unittests.
0006 -----END QCMOD-----
0007 */
0008 
0009 class qc_extra : public ConfObj
0010 {
0011 public:
0012         qc_extra(Conf *c) : ConfObj(c) {}
0013         QString name() const { return "extra"; }
0014         QString shortname() const { return "extra"; }
0015 
0016         // no output
0017         QString checkString() const { return QString(); }
0018 
0019         bool exec()
0020         {
0021                 QString str;
0022                 QFile f;
0023 
0024                 if(conf->getenv("QC_DISABLE_TESTS") == "Y")
0025                         str += "CONFIG += no_tests\n";
0026 
0027                 conf->addExtra(str);
0028 
0029                 bool release = true;
0030                 bool debug = false;
0031                 bool debug_info = false;
0032                 bool universal = false;
0033                 QString sdk;
0034 
0035 #ifdef QC_BUILDMODE
0036                 release = qc_buildmode_release;
0037                 debug = qc_buildmode_debug;
0038                 debug_info = qc_buildmode_separate_debug_info;
0039 #endif
0040 
0041 #ifdef QC_UNIVERSAL
0042                 universal = qc_universal_enabled;
0043                 sdk = qc_universal_sdk;
0044 #endif
0045 
0046                 // write confapp_unix.pri
0047                 str = QString();
0048                 QString var = conf->getenv("BINDIR");
0049                 if(!var.isEmpty())
0050                         str += QString("BINDIR = %1\n").arg(var);
0051                 if(debug) // debug or debug-and-release
0052                         str += QString("CONFIG += debug\n");
0053                 else // release
0054                         str += QString("CONFIG += release\n");
0055                 if(debug_info)
0056                 {
0057                         str += QString("CONFIG += separate_debug_info\n");
0058                         str += "QMAKE_CFLAGS += -g\n";
0059                         str += "QMAKE_CXXFLAGS += -g\n";
0060                 }
0061                 if(universal)
0062                 {
0063                         str +=
0064                         "contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {\n"
0065                         "       CONFIG += x86 ppc\n"
0066                         "}\n";
0067 
0068                         if(!sdk.isEmpty())
0069                                 str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
0070                 }
0071 #ifdef QC_QCA
0072                 if(!qc_qca_procode.isEmpty())
0073                         str += qc_qca_procode;
0074 #endif
0075                 f.setFileName("confapp_unix.pri");
0076                 if(f.open(QFile::WriteOnly | QFile::Truncate))
0077                         f.write(str.toLatin1());
0078                 f.close();
0079 
0080                 return true;
0081         }
0082 
0083         QString makeEscapedDefine(const QString &var, const QString &val)
0084         {
0085                 QString str = QString(
0086                 "DEFINES += %1=\\\\\\\\\\\\\\"%2\\\\\\\\\\\\\\"\n"
0087                 ).arg(var).arg(val);
0088                 return str;
0089         }
0090 };