diff options
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 48 |
1 files changed, 19 insertions, 29 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 873568daf8..d31232262a 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -135,23 +135,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"); @@ -192,7 +178,6 @@ Configure::Configure(int& argc, char** argv) dictionary[ "AUDIO_BACKEND" ] = "auto"; dictionary[ "WMF_BACKEND" ] = "auto"; dictionary[ "WMSDK" ] = "auto"; - dictionary[ "V8SNAPSHOT" ] = "auto"; dictionary[ "QML_DEBUG" ] = "yes"; dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; dictionary[ "DIRECTWRITE" ] = "no"; @@ -2163,8 +2148,6 @@ bool Configure::checkAvailability(const QString &part) && !QStandardPaths::findExecutable(QStringLiteral("xgConsole.exe")).isEmpty(); } else if (part == "WMSDK") { available = findFile("wmsdk.h"); - } else if (part == "V8SNAPSHOT") { - available = true; } else if (part == "AUDIO_BACKEND") { available = true; } else if (part == "WMF_BACKEND") { @@ -2282,8 +2265,6 @@ void Configure::autoDetection() dictionary["OPENSSL"] = checkAvailability("OPENSSL") ? "yes" : "no"; if (dictionary["DBUS"] == "auto") dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no"; - if (dictionary["V8SNAPSHOT"] == "auto") - dictionary["V8SNAPSHOT"] = (dictionary["V8"] == "yes") && checkAvailability("V8SNAPSHOT") ? "yes" : "no"; if (dictionary["QML_DEBUG"] == "auto") dictionary["QML_DEBUG"] = dictionary["QML"] == "yes" ? "yes" : "no"; if (dictionary["AUDIO_BACKEND"] == "auto") @@ -2703,10 +2684,6 @@ void Configure::generateOutputVars() // We currently have no switch for QtConcurrent, so add it unconditionally. qtConfig += "concurrent"; - // ### Vestige - if (dictionary[ "V8SNAPSHOT" ] == "yes") - qtConfig += "v8snapshot"; - if (dictionary[ "SYSTEM_PROXIES" ] == "yes") qtConfig += "system-proxies"; @@ -2836,6 +2813,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; @@ -3151,15 +3136,17 @@ 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 << " QT_TARGET_ARCH = " << dictionary["QT_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 @@ -3950,6 +3937,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(); |