summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2015-06-15 14:09:19 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2015-07-21 08:21:34 +0000
commit297816375937de46aec5e53963c6332190ed373e (patch)
treed50551302695ed5b51cb021e6525f6380c1c7cf0 /tools
parente5b8c3853035e99e5dab7975dbbfcbcf7bd995e8 (diff)
Windows: Include DirectWrite support by default if available
This will automatically add DirectWrite support if the required headers are found. The note about platform support from the help screen has also been removed, since Windows XP is not officially supported. Applications that need to run on XP can still build with -no-directwrite. Also changed the configure test to be a proper compile test, since cross-compiled builds for Windows CE may break otherwise. Change-Id: I7fc7bfb25f2f86ced8a4d4c78a69527de0273707 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index c4e915b936..c4455eeb63 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -169,7 +169,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "WMSDK" ] = "auto";
dictionary[ "QML_DEBUG" ] = "yes";
dictionary[ "PLUGIN_MANIFESTS" ] = "no";
- dictionary[ "DIRECTWRITE" ] = "no";
+ dictionary[ "DIRECTWRITE" ] = "auto";
dictionary[ "DIRECT2D" ] = "no";
dictionary[ "NIS" ] = "no";
dictionary[ "NEON" ] = "auto";
@@ -2010,8 +2010,8 @@ bool Configure::displayHelp()
desc("WMF_BACKEND", "yes","-wmf-backend", "Compile in the windows media foundation backend into Qt Multimedia.\n");
desc("QML_DEBUG", "no", "-no-qml-debug", "Do not build the in-process QML debugging support.");
desc("QML_DEBUG", "yes", "-qml-debug", "Build the in-process QML debugging support.\n");
- desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering.");
- desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering (requires DirectWrite availability on target systems, e.g. Windows Vista with Platform Update, Windows 7, etc.)\n");
+ desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering.");
+ desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering.\n");
desc("DIRECT2D", "no", "-no-direct2d", "Do not build the Direct2D platform plugin.");
desc("DIRECT2D", "yes", "-direct2d", "Build the Direct2D platform plugin (experimental,\n"
@@ -2291,9 +2291,7 @@ bool Configure::checkAvailability(const QString &part)
} else if (part == "WMF_BACKEND") {
available = findFile("mfapi.h") && findFile("mf.lib");
} else if (part == "DIRECTWRITE") {
- const char *dwriteLibrary = Environment::detectCompiler() != CC_MINGW
- ? "dwrite.lib" : "libdwrite.a";
- available = findFile("dwrite.h") && findFile("d2d1.h") && findFile(QLatin1String(dwriteLibrary));
+ available = tryCompileProject("win/directwrite");
} else if (part == "DIRECT2D") {
available = tryCompileProject("qpa/direct2d");
} else if (part == "ICONV") {
@@ -2512,6 +2510,9 @@ void Configure::autoDetection()
if (dictionary["FONT_CONFIG"] == "auto")
dictionary["FONT_CONFIG"] = checkAvailability("FONT_CONFIG") ? "yes" : "no";
+ if (dictionary["DIRECTWRITE"] == "auto")
+ dictionary["DIRECTWRITE"] = checkAvailability("DIRECTWRITE") ? "yes" : "no";
+
// Mark all unknown "auto" to the default value..
for (QMap<QString,QString>::iterator i = dictionary.begin(); i != dictionary.end(); ++i) {
if (i.value() == "auto")