From 297816375937de46aec5e53963c6332190ed373e Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 15 Jun 2015 14:09:19 +0200 Subject: 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 Reviewed-by: Konstantin Ritt --- tools/configure/configureapp.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tools') 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::iterator i = dictionary.begin(); i != dictionary.end(); ++i) { if (i.value() == "auto") -- cgit v1.2.3