bool QMakeProperty::exec() { bool ret = true; if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY) { if(Option::prop::properties.isEmpty()) { initSettings(); foreach (const QString &key, settings->childKeys()) { QString val = settings->value(key).toString(); fprintf(stdout, "%s:%s\n", qPrintable(key), qPrintable(val)); } QStringList specialProps; for (int i = 0; i < sizeof(propList)/sizeof(propList[0]); i++) specialProps.append(QString::fromLatin1(propList[i].name)); specialProps.append("QMAKE_VERSION"); #ifdef QT_VERSION_STR specialProps.append("QT_VERSION"); #endif foreach (QString prop, specialProps) { ProString val = value(ProKey(prop)); ProString pval = value(ProKey(prop + "/raw")); ProString gval = value(ProKey(prop + "/get")); fprintf(stdout, "%s:%s\n", prop.toLatin1().constData(), val.toLatin1().constData()); if (!pval.isEmpty() && pval != val) fprintf(stdout, "%s/raw:%s\n", prop.toLatin1().constData(), pval.toLatin1().constData()); if (!gval.isEmpty() && gval != (pval.isEmpty() ? val : pval)) fprintf(stdout, "%s/get:%s\n", prop.toLatin1().constData(), gval.toLatin1().constData()); } return true; }
//Factory things QT_BEGIN_INCLUDE_NAMESPACE #include "unixmake.h" #include "mingw_make.h" #include "projectgenerator.h" #include "pbuilder_pbx.h" #include "msvc_nmake.h" #include "msvc_vcproj.h" #include "msvc_vcxproj.h" #include "gbuild.h" QT_END_INCLUDE_NAMESPACE MakefileGenerator * MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) { Option::postProcessProject(proj); MakefileGenerator *mkfile = NULL; if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) { mkfile = new ProjectGenerator; mkfile->setProjectFile(proj); return mkfile; } ProString gen = proj->first("MAKEFILE_GENERATOR"); if(gen.isEmpty()) { fprintf(stderr, "MAKEFILE_GENERATOR variable not set as a result of parsing : %s. Possibly qmake was not able to find files included using \"include(..)\" - enable qmake debugging to investigate more.\n", proj->projectFile().toLatin1().constData()); } else if(gen == "UNIX") { mkfile = new UnixMakefileGenerator; } else if(gen == "MINGW") { mkfile = new MingwMakefileGenerator; } else if(gen == "PROJECTBUILDER" || gen == "XCODE") { #ifdef Q_CC_MSVC fprintf(stderr, "Generating Xcode projects is not supported with an MSVC build of Qt.\n"); #else mkfile = new ProjectBuilderMakefileGenerator; #endif } else if(gen == "MSVC.NET") { if (proj->first("TEMPLATE").startsWith("vc")) mkfile = new VcprojGenerator; else mkfile = new NmakeMakefileGenerator; } else if(gen == "MSBUILD") { // Visual Studio >= v11.0 if (proj->first("TEMPLATE").startsWith("vc")) mkfile = new VcxprojGenerator; else mkfile = new NmakeMakefileGenerator; } else if(gen == "GBUILD") { mkfile = new GBuildMakefileGenerator; } else { fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData()); } if (mkfile) { mkfile->setNoIO(noIO); mkfile->setProjectFile(proj); } return mkfile; }