summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-03-29 20:49:08 -0700
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-03-30 22:54:31 +0000
commit0133b59246a0daf88a0ba284a2cd9f65a5ece353 (patch)
tree2a316c272855421480a267a73651f499032e71dc /src/platformsupport/fontdatabases
parent0c8b5446d42b27b601ff369a8f93c4875feba2a5 (diff)
Fix CoreText font database build on watchOS
The font database uses UIKit symbols on all UIKit platforms and thus it must be linked to. Also, limit the missing CoreText.h workaround so that it is not applied for versions of Xcode where the bug is fixed. Change-Id: Ia2a94baba6b0df618604a0bc3092fbd2a48d5aea Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/platformsupport/fontdatabases')
-rw-r--r--src/platformsupport/fontdatabases/mac/coretext.pri18
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h7
2 files changed, 3 insertions, 22 deletions
diff --git a/src/platformsupport/fontdatabases/mac/coretext.pri b/src/platformsupport/fontdatabases/mac/coretext.pri
index f73e22eb1a..3d928d4e71 100644
--- a/src/platformsupport/fontdatabases/mac/coretext.pri
+++ b/src/platformsupport/fontdatabases/mac/coretext.pri
@@ -9,23 +9,9 @@ qtConfig(freetype) {
uikit: \
# On iOS/tvOS/watchOS CoreText and CoreGraphics are stand-alone frameworks
- LIBS_PRIVATE += -framework CoreText -framework CoreGraphics
+ LIBS_PRIVATE += -framework CoreText -framework CoreGraphics -framework UIKit
else: \
# On macOS they are re-exported by the AppKit framework
LIBS_PRIVATE += -framework AppKit
-# CoreText is documented to be available on watchOS, but the headers aren't present
-# in the watchOS Simulator SDK like they are supposed to be. Work around the problem
-# by adding the device SDK's headers to the search path as a fallback.
-# rdar://25314492, rdar://27844864
-watchos:simulator {
- simulator_system_frameworks = $$xcodeSDKInfo(Path, $${simulator.sdk})/System/Library/Frameworks
- device_system_frameworks = $$xcodeSDKInfo(Path, $${device.sdk})/System/Library/Frameworks
- for (arch, QMAKE_APPLE_SIMULATOR_ARCHS) {
- QMAKE_CXXFLAGS += \
- -Xarch_$${arch} \
- -F$$simulator_system_frameworks \
- -Xarch_$${arch} \
- -F$$device_system_frameworks
- }
-}
+CONFIG += watchos_coretext
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
index 3b1be2e6a1..344e235053 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
@@ -57,12 +57,7 @@
#include <qpa/qplatformtheme.h>
#include <private/qcore_mac_p.h>
-#ifdef Q_OS_OSX
-#include <ApplicationServices/ApplicationServices.h>
-#else
-#include <CoreText/CoreText.h>
-#include <CoreGraphics/CoreGraphics.h>
-#endif
+Q_FORWARD_DECLARE_CF_TYPE(CTFontDescriptor);
Q_DECLARE_METATYPE(QCFType<CGFontRef>);
Q_DECLARE_METATYPE(QCFType<CFURLRef>);