summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/win/directwrite/directwrite.cpp44
-rw-r--r--config.tests/win/directwrite/directwrite.pro4
-rw-r--r--tools/configure/configureapp.cpp13
3 files changed, 55 insertions, 6 deletions
diff --git a/config.tests/win/directwrite/directwrite.cpp b/config.tests/win/directwrite/directwrite.cpp
new file mode 100644
index 0000000000..01bea19faf
--- /dev/null
+++ b/config.tests/win/directwrite/directwrite.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <dwrite.h>
+#include <d2d1.h>
+
+int main(int, char**)
+{
+ IDWriteFactory *factory = 0;
+ DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
+ __uuidof(IDWriteFactory),
+ reinterpret_cast<IUnknown **>(&factory));
+ return 0;
+}
diff --git a/config.tests/win/directwrite/directwrite.pro b/config.tests/win/directwrite/directwrite.pro
new file mode 100644
index 0000000000..9a4612ca11
--- /dev/null
+++ b/config.tests/win/directwrite/directwrite.pro
@@ -0,0 +1,4 @@
+SOURCES = directwrite.cpp
+LIBS += -ldwrite
+CONFIG -= qt
+CONFIG += console
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")