summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_nmake.cpp
diff options
context:
space:
mode:
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);
}