diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 0ac3730b4e..cd5ed4caea 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -151,23 +151,9 @@ Configure::Configure(int& argc, char** argv) const QString installPath = buildPath; #endif if (sourceDir != buildDir) { //shadow builds! - cout << "Preparing build tree..." << endl; QDir(buildPath).mkpath("bin"); - //copy the mkspecs buildDir.mkpath("mkspecs"); - if (!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){ - cout << "Couldn't copy mkspecs!" << sourcePath << " " << buildPath << endl; - dictionary["DONE"] = "error"; - return; - } - - buildDir.mkpath("doc"); - if (!Environment::cpdir(sourcePath + "/doc/global", buildPath + "/doc/global")) { - cout << "Couldn't copy global documentation!" << sourcePath << " " << buildPath << endl; - dictionary["DONE"] = "error"; - return; - } } defaultBuildParts << QStringLiteral("libs") << QStringLiteral("tools") << QStringLiteral("examples"); @@ -2836,6 +2822,14 @@ void Configure::generateCachefile() moduleStream << "QT_SKIP_MODULES += " << skipModules.join(' ') << endl; moduleStream << endl; + moduleStream << "host_build {" << endl; + moduleStream << " QT_CPU_FEATURES." << dictionary["QT_HOST_ARCH"] << + " = " << dictionary["QT_HOST_CPU_FEATURES"] << endl; + moduleStream << "} else {" << endl; + moduleStream << " QT_CPU_FEATURES." << dictionary["QT_ARCH"] << + " = " << dictionary["QT_CPU_FEATURES"] << endl; + moduleStream << "}" << endl; + if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE") moduleStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl; @@ -3117,15 +3111,16 @@ void Configure::generateQConfigPri() configStream << " qpa"; configStream << endl; - configStream << "QT_ARCH = " << dictionary["QT_ARCH"] << endl; - configStream << "QT_HOST_ARCH = " << dictionary["QT_HOST_ARCH"] << endl; - configStream << "QT_CPU_FEATURES = " << dictionary["QT_CPU_FEATURES"] << endl; - configStream << "QT_HOST_CPU_FEATURES = " << dictionary["QT_HOST_CPU_FEATURES"] << endl; + configStream << "host_build {" << endl; + configStream << " QT_ARCH = " << dictionary["QT_HOST_ARCH"] << endl; + configStream << "} else {" << endl; + configStream << " QT_ARCH = " << dictionary["QT_ARCH"] << endl; if (dictionary.contains("XQMAKESPEC") && !dictionary["XQMAKESPEC"].startsWith("wince")) { // FIXME: add detection - configStream << "QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; - configStream << "QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; + configStream << " QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; + configStream << " QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; } + configStream << "}" << endl; if (dictionary["QT_EDITION"].contains("OPENSOURCE")) configStream << "QT_EDITION = " << QLatin1String("OpenSource") << endl; else @@ -3928,6 +3923,9 @@ void Configure::buildQmake() QTextStream confStream(&confFile); confStream << "[EffectivePaths]" << endl << "Prefix=.." << endl; + if (sourcePath != buildPath) + confStream << "[EffectiveSourcePaths]" << endl + << "Prefix=" << sourcePath << endl; confStream.flush(); confFile.close(); |