summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2019-07-21 14:29:44 +0000
committerChristoph Reiter <reiter.christoph@gmail.com>2019-07-21 14:29:44 +0000
commitc063d8879ee538b8352d1e97184c513e0fda5670 (patch)
tree4601c38bb81d02a6e7b5056a2ff2bf90ed3f2775 /meson.build
parent9f217e7f93f63bf1ee26e23dd978e1729461b9b1 (diff)
parentda059347f8df5fc180b4538d9d3c50867c401fbd (diff)
downloadpango-c063d8879ee538b8352d1e97184c513e0fda5670.tar.gz
Merge branch 'improve-fontconfig-dep-search' into 'master'
build: Only use fallback dep for FontConfig when needed/requested See merge request GNOME/pango!94
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 9 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 519251f2..d690aec5 100644
--- a/meson.build
+++ b/meson.build
@@ -259,8 +259,10 @@ if harfbuzz_dep.found()
pango_deps += harfbuzz_dep
endif
-fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version, required: false,
- fallback: ['fontconfig', 'fontconfig_dep'])
+# Only use FontConfig fallback when required or requested
+fontconfig_required = (host_system != 'windows' and host_system != 'darwin') or get_option('use_fontconfig')
+
+fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version, required: false)
if fontconfig_dep.found()
fontconfig_pc = 'fontconfig'
else
@@ -274,6 +276,11 @@ else
endif
endif
+if fontconfig_required and not fontconfig_dep.found()
+ fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version,
+ fallback: ['fontconfig', 'fontconfig_dep'])
+endif
+
if fontconfig_dep.found()
pango_deps += fontconfig_dep