summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_nmake.cpp
diff options
context:
space:
mode:
authorBjoern Breitmeyer <bjoern.breitmeyer@kdab.com>2012-05-11 10:24:28 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:46:09 +0200
commit00f9ac93c248b019e72757da9c5d8121a5fd1bf5 (patch)
treed4a29bd28b14ba0db2edaeda7593bee2bf3839f0 /qmake/generators/win32/msvc_nmake.cpp
parent2f1762535b87ffe2572a25a4de0f3b83bf408595 (diff)
Fixed Wince Makefile environment
Integrated the checksdk tool into qmake and made the makefiles selfcontained, so configure make, is now enough to build qt for wince Change-Id: I29076702eca2ec23d4d06bb3d5c5cef9d4f95161 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake/generators/win32/msvc_nmake.cpp')
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index db6651cb88..adf8883b01 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -41,6 +41,7 @@
#include "msvc_nmake.h"
#include "option.h"
+#include "cesdkhandler.h"
#include <qregexp.h>
#include <qhash.h>
#include <qdir.h>
@@ -76,6 +77,30 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
if(Option::mkfile::do_stub_makefile)
return MakefileGenerator::writeStubMakefile(t);
#endif
+ if (!project->isHostBuild()) {
+ const QHash<QString, QStringList> &variables = project->variables();
+ if (variables.contains("XQMAKESPEC")
+ && !variables["XQMAKESPEC"].isEmpty()
+ && variables["XQMAKESPEC"].first().contains("wince", Qt::CaseInsensitive)) {
+ CeSdkHandler sdkhandler;
+ sdkhandler.parse();
+ const QString sdkName = variables["CE_SDK"].join(" ")
+ + " (" + variables["CE_ARCH"].join(" ") + ")";
+ const QList<CeSdkInfo> sdkList = sdkhandler.listAll();
+ CeSdkInfo sdk;
+ foreach (const CeSdkInfo &info, sdkList) {
+ if (info.name().compare(sdkName, Qt::CaseInsensitive ) == 0) {
+ sdk = info;
+ break;
+ }
+ }
+ if (sdk.isValid()) {
+ t << "\nINCLUDE = " << sdk.includePath();
+ t << "\nLIB = " << sdk.libPath();
+ t << "\nPATH = " << sdk.binPath() << "\n";
+ }
+ }
+ }
writeNmakeParts(t);
return MakefileGenerator::writeMakefile(t);
}