summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp68
1 files changed, 62 insertions, 6 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 5ab413a971..c0f37feb25 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -182,6 +182,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "QML_DEBUG" ] = "yes";
dictionary[ "PLUGIN_MANIFESTS" ] = "no";
dictionary[ "DIRECTWRITE" ] = "no";
+ dictionary[ "DIRECT2D" ] = "no";
dictionary[ "NIS" ] = "no";
dictionary[ "NEON" ] = "auto";
dictionary[ "LARGE_FILE" ] = "yes";
@@ -194,6 +195,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "QT_CUPS" ] = "auto";
dictionary[ "CFG_GCC_SYSROOT" ] = "yes";
dictionary[ "SLOG2" ] = "no";
+ dictionary[ "QNX_IMF" ] = "no";
dictionary[ "PPS" ] = "no";
dictionary[ "SYSTEM_PROXIES" ] = "no";
dictionary[ "WERROR" ] = "auto";
@@ -880,6 +882,10 @@ void Configure::parseCmdLine()
dictionary[ "SLOG2" ] = "no";
} else if (configCmdLine.at(i) == "-slog2") {
dictionary[ "SLOG2" ] = "yes";
+ } else if (configCmdLine.at(i) == "-no-imf") {
+ dictionary[ "QNX_IMF" ] = "no";
+ } else if (configCmdLine.at(i) == "-imf") {
+ dictionary[ "QNX_IMF" ] = "yes";
} else if (configCmdLine.at(i) == "-no-pps") {
dictionary[ "PPS" ] = "no";
} else if (configCmdLine.at(i) == "-pps") {
@@ -1213,6 +1219,12 @@ void Configure::parseCmdLine()
dictionary["DIRECTWRITE"] = "no";
}
+ else if (configCmdLine.at(i) == "-direct2d") {
+ dictionary["DIRECT2D"] = "yes";
+ } else if (configCmdLine.at(i) == "-no-direct2d") {
+ dictionary["DIRECT2D"] = "no";
+ }
+
else if (configCmdLine.at(i) == "-nis") {
dictionary["NIS"] = "yes";
} else if (configCmdLine.at(i) == "-no-nis") {
@@ -1595,18 +1607,17 @@ void Configure::applySpecSpecifics()
dictionary[ "LIBJPEG" ] = "qt";
dictionary[ "LIBPNG" ] = "qt";
dictionary[ "FREETYPE" ] = "yes";
- dictionary[ "ACCESSIBILITY" ] = "no";
- dictionary[ "OPENGL" ] = "no";
- dictionary[ "OPENGL_ES_2" ] = "no";
+ dictionary[ "OPENGL" ] = "yes";
+ dictionary[ "OPENGL_ES_2" ] = "yes";
dictionary[ "OPENVG" ] = "no";
- dictionary[ "OPENSSL" ] = "auto";
+ dictionary[ "OPENSSL" ] = "no";
dictionary[ "DBUS" ] = "no";
dictionary[ "ZLIB" ] = "qt";
dictionary[ "PCRE" ] = "qt";
dictionary[ "ICU" ] = "qt";
dictionary[ "CE_CRT" ] = "yes";
dictionary[ "LARGE_FILE" ] = "no";
- dictionary[ "ANGLE" ] = "no";
+ dictionary[ "ANGLE" ] = "d3d11";
if (dictionary.value("XQMAKESPEC").startsWith("winphone"))
dictionary[ "SQL_SQLITE" ] = "no";
} else if (dictionary.value("XQMAKESPEC").startsWith("wince")) {
@@ -1653,6 +1664,7 @@ void Configure::applySpecSpecifics()
} else if ((platform() == QNX) || (platform() == BLACKBERRY)) {
dictionary["STACK_PROTECTOR_STRONG"] = "auto";
dictionary["SLOG2"] = "auto";
+ dictionary["QNX_IMF"] = "auto";
dictionary["PPS"] = "auto";
dictionary["QT_XKBCOMMON"] = "no";
dictionary[ "ANGLE" ] = "no";
@@ -1870,7 +1882,8 @@ bool Configure::displayHelp()
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
desc("SLOG2", "yes", "-slog2", "Compile with slog2 support.");
desc("SLOG2", "no", "-no-slog2", "Do not compile with slog2 support.");
-
+ desc("QNX_IMF", "yes", "-imf", "Compile with imf support.");
+ desc("QNX_IMF", "no", "-no-imf", "Do not compile with imf support.");
desc("PPS", "yes", "-pps", "Compile with PPS support.");
desc("PPS", "no", "-no-pps", "Do not compile with PPS support.");
}
@@ -1933,6 +1946,11 @@ bool Configure::displayHelp()
desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering.");
desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering (experimental, requires DirectWrite availability on target systems, e.g. Windows Vista with Platform Update, Windows 7, etc.)\n");
+ desc("DIRECT2D", "no", "-no-direct2d", "Do not build the Direct2D platform plugin.");
+ desc("DIRECT2D", "yes", "-direct2d", "Build the Direct2D platform plugin (experimental,\n"
+ "requires Direct2D availability on target systems,\n"
+ "e.g. Windows 7 with Platform Update, Windows 8, etc.)\n");
+
desc( "-no-style-<style>", "Disable <style> entirely.");
desc( "-qt-style-<style>", "Enable <style> in the Qt Library.\nAvailable styles: ");
@@ -2200,6 +2218,8 @@ bool Configure::checkAvailability(const QString &part)
available = findFile("mfapi.h") && findFile("mf.lib");
} else if (part == "DIRECTWRITE") {
available = findFile("dwrite.h") && findFile("d2d1.h") && findFile("dwrite.lib");
+ } else if (part == "DIRECT2D") {
+ available = tryCompileProject("qpa/direct2d");
} else if (part == "ICONV") {
available = tryCompileProject("unix/iconv") || tryCompileProject("unix/gnu-libiconv");
} else if (part == "INOTIFY") {
@@ -2212,6 +2232,8 @@ bool Configure::checkAvailability(const QString &part)
available = (platform() == QNX || platform() == BLACKBERRY) && compilerSupportsFlag("qcc -fstack-protector-strong");
} else if (part == "SLOG2") {
available = tryCompileProject("unix/slog2");
+ } else if (part == "QNX_IMF") {
+ available = tryCompileProject("unix/qqnx_imf");
} else if (part == "PPS") {
available = (platform() == QNX || platform() == BLACKBERRY) && tryCompileProject("unix/pps");
} else if (part == "NEON") {
@@ -2359,6 +2381,10 @@ void Configure::autoDetection()
dictionary["SLOG2"] = checkAvailability("SLOG2") ? "yes" : "no";
}
+ if ((platform() == QNX || platform() == BLACKBERRY) && dictionary["QNX_IMF"] == "auto") {
+ dictionary["QNX_IMF"] = checkAvailability("QNX_IMF") ? "yes" : "no";
+ }
+
if (dictionary["PPS"] == "auto") {
dictionary["PPS"] = checkAvailability("PPS") ? "yes" : "no";
}
@@ -2429,6 +2455,13 @@ bool Configure::verifyConfiguration()
prompt = true;
}
+ if (dictionary["DIRECT2D"] == "yes" && !checkAvailability("DIRECT2D")) {
+ cout << "WARNING: To be able to build the Direct2D platform plugin you will" << endl
+ << "need the Microsoft DirectWrite and Microsoft Direct2D development" << endl
+ << "files such as headers and libraries." << endl;
+ prompt = true;
+ }
+
// -angle given on command line, but Direct X cannot be found.
if (dictionary["ANGLE"] != "no") {
QString errorMessage;
@@ -2718,6 +2751,9 @@ void Configure::generateOutputVars()
if (dictionary["DIRECTWRITE"] == "yes")
qtConfig += "directwrite";
+ if (dictionary["DIRECT2D"] == "yes")
+ qtConfig += "direct2d";
+
if (dictionary[ "NATIVE_GESTURES" ] == "yes")
qtConfig += "native-gestures";
@@ -2988,6 +3024,10 @@ void Configure::detectArch()
.arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"),
QDir::toNativeSeparators(qmakespec),
QDir::toNativeSeparators(sourcePath + "/config.tests/arch/arch.pro"));
+
+ if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
+ command.append(" QMAKE_LFLAGS+=/ENTRY:main");
+
int returnValue = 0;
Environment::execute(command, &returnValue);
if (returnValue != 0) {
@@ -3088,6 +3128,13 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
.arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"),
QDir::toNativeSeparators(sourcePath + "/config.tests/" + projectPath),
extraOptions);
+
+ if (dictionary.contains("XQMAKESPEC")) {
+ const QString qmakespec = dictionary["XQMAKESPEC"];
+ if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone"))
+ command.append(" QMAKE_LFLAGS+=/ENTRY:main");
+ }
+
int code = 0;
QString output = Environment::execute(command, &code);
//cout << output << endl;
@@ -3189,6 +3236,9 @@ void Configure::generateQConfigPri()
if (dictionary[ "SLOG2" ] == "yes")
configStream << " slog2";
+ if (dictionary[ "QNX_IMF" ] == "yes")
+ configStream << " qqnx_imf";
+
if (dictionary[ "PPS" ] == "yes")
configStream << " qqnx_pps";
@@ -3548,6 +3598,11 @@ void Configure::displayConfig()
sout << "Use system proxies.........." << dictionary[ "SYSTEM_PROXIES" ] << endl;
sout << endl;
+ sout << "QPA Backends:" << endl;
+ sout << " GDI....................." << "yes" << endl;
+ sout << " Direct2D................" << dictionary[ "DIRECT2D" ] << endl;
+ sout << endl;
+
sout << "Third Party Libraries:" << endl;
sout << " ZLIB support............" << dictionary[ "ZLIB" ] << endl;
sout << " GIF support............." << dictionary[ "GIF" ] << endl;
@@ -3560,6 +3615,7 @@ void Configure::displayConfig()
sout << " ICU support............." << dictionary[ "ICU" ] << endl;
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
sout << " SLOG2 support..........." << dictionary[ "SLOG2" ] << endl;
+ sout << " IMF support............." << dictionary[ "QNX_IMF" ] << endl;
sout << " PPS support............." << dictionary[ "PPS" ] << endl;
}
sout << " ANGLE..................." << dictionary[ "ANGLE" ] << endl;