diff options
-rw-r--r-- | meson.build | 12 | ||||
-rw-r--r-- | pango/meson.build | 7 |
2 files changed, 14 insertions, 5 deletions
diff --git a/meson.build b/meson.build index a0d2ecc4..904027ba 100644 --- a/meson.build +++ b/meson.build @@ -57,8 +57,8 @@ common_ldflags = [] if cc.get_id() == 'msvc' # Compiler options taken from msvc_recommended_pragmas.h # in GLib, based on _Win32_Programming_ by Rector and Newcomer - test_cflags = [] - add_project_arguments([ '-FImsvc_recommended_pragmas.h' ], language: 'c') + test_cflags = ['-FImsvc_recommended_pragmas', '-utf-8'] + add_project_arguments(cc.get_supported_arguments(test_cflags), language: 'c') test_c_only_flags = [] elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' test_c_only_flags = [ @@ -312,8 +312,7 @@ message('fontconfig has FcWeightFromOpenTypeDouble: ' + res) # The first version of freetype with a pkg-config file is 2.1.5 # We require both fontconfig and freetype if we are to have either. -freetype_dep = dependency('freetype2', required: false, - fallback: ['freetype2', 'freetype_dep']) +freetype_dep = dependency('freetype2', required: false) if freetype_dep.found() freetype2_pc = 'freetype2' @@ -330,6 +329,11 @@ else endif endif +if fontconfig_required and not freetype_dep.found() + freetype_dep = dependency('freetype2', required: false, + fallback: ['freetype2', 'freetype_dep']) +endif + # To build pangoft2, we need HarfBuzz, FontConfig and FreeType build_pangoft2 = harfbuzz_dep.found() and fontconfig_dep.found() and freetype_dep.found() if build_pangoft2 diff --git a/pango/meson.build b/pango/meson.build index 738bd36c..b2496373 100644 --- a/pango/meson.build +++ b/pango/meson.build @@ -152,11 +152,16 @@ libpango_dep = declare_dependency( sources: pango_dep_sources, ) +pango_pkg_requires = ['gobject-2.0'] +if harfbuzz_dep.type_name() == 'pkgconfig' + pango_pkg_requires += 'harfbuzz' +endif + pkgconfig.generate(libpango, name: 'Pango', description: 'Internationalized text handling', version: meson.project_version(), - requires: ['gobject-2.0', 'harfbuzz'], + requires: pango_pkg_requires, filebase: 'pango', subdirs: pango_api_name, install_dir: join_paths(pango_libdir, 'pkgconfig'), |