summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Miller <emmiller@gmail.com>2021-09-07 21:19:38 -0400
committerEvan Miller <emmiller@gmail.com>2021-09-07 21:19:38 -0400
commit2a87ef3315603e0144e05a954cb1abe21633dd94 (patch)
tree40c336e80466c9754dd73bce06563abd42b1757d
parent6a0c62a7219a4d0340bce9822fff561737736d32 (diff)
downloadpango-2a87ef3315603e0144e05a954cb1abe21633dd94.tar.gz
Require CoreText for Quartz backend
Also fix CoreText detection by including its header. (Older systems have CoreText as a private framework.)
-rw-r--r--meson.build23
1 files changed, 13 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index d37ed8ac..6c6fed7c 100644
--- a/meson.build
+++ b/meson.build
@@ -405,7 +405,7 @@ if xft_dep.found() and fontconfig_dep.found() and freetype_dep.found()
endif
if host_system == 'darwin'
- has_core_text = cc.links('''#include <Carbon/Carbon.h>
+ has_core_text = cc.links('''#include <CoreText/CoreText.h>
int main (void) {
CTGetCoreTextVersion ();
return 0;
@@ -481,15 +481,14 @@ if ['pkgconfig', 'internal'].contains(cairo_found_type)
endforeach
endif
if dep.found()
- if b[0] == 'cairo-ft'
- if build_pangoft2
- pango_conf.set(b[2], 1)
- pango_font_backends += b[3]
- endif
- else
- pango_conf.set(b[2], 1)
- pango_font_backends += b[3]
+ if b[0] == 'cairo-ft' and not build_pangoft2
+ continue
+ endif
+ if b[0] == 'cairo-quartz' and not pango_conf.has('HAVE_CORE_TEXT')
+ continue
endif
+ pango_conf.set(b[2], 1)
+ pango_font_backends += b[3]
endif
endforeach
@@ -538,8 +537,12 @@ elif cairo_found_type == 'library'
foreach header : cairo_headers
if cc.has_header('cairo-@0@.h'.format(header))
pango_conf.set('HAVE_CAIRO_@0@'.format(header.underscorify().to_upper()), 1)
- if header == 'win32' or header == 'quartz'
+ if header == 'win32'
pango_font_backends += header
+ elif header == 'quartz'
+ if pango_conf.has('HAVE_CORE_TEXT')
+ pango_font_backends += header
+ endif
else
pango_cairo_backends += header
endif