From a4f3a752ddd89b1155978fe862d6f45bd5a89d53 Mon Sep 17 00:00:00 2001 From: ebraminio Date: Tue, 1 Sep 2020 03:21:12 +0200 Subject: [PATCH 1/2] [build] hb-directwrite needs a C++ linker --- src/meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index 186563365..5cc30da0c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -351,10 +351,12 @@ if conf.get('HAVE_UNISCRIBE', 0) == 1 hb_headers += hb_uniscribe_headers endif +has_directwrite = false if conf.get('HAVE_DIRECTWRITE', 0) == 1 hb_sources += hb_directwrite_sources hb_headers += hb_directwrite_headers harfbuzz_deps += directwrite_dep + has_directwrite = true endif if conf.get('HAVE_CORETEXT', 0) == 1 @@ -408,6 +410,12 @@ endif darwin_versions = [hb_version_int, '@0@.0.0'.format(hb_version_int)] +libharfbuzz_link_language = 'c' +if has_directwrite + # hb-directwrite needs a C++ linker + libharfbuzz_link_language = 'cpp' +endif + libharfbuzz = library('harfbuzz', hb_sources, include_directories: incconfig, dependencies: harfbuzz_deps, @@ -416,7 +424,7 @@ libharfbuzz = library('harfbuzz', hb_sources, version: version, install: true, darwin_versions: darwin_versions, - link_language: 'c', + link_language: libharfbuzz_link_language, ) libharfbuzz_dep = declare_dependency( From fe6381d9f1a34f33f020d4f7c871304376dc2844 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 1 Sep 2020 03:44:01 +0200 Subject: [PATCH 2/2] [build] Minor --- src/meson.build | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/meson.build b/src/meson.build index 5cc30da0c..5d7cd5784 100644 --- a/src/meson.build +++ b/src/meson.build @@ -322,6 +322,8 @@ hb_headers = hb_base_headers harfbuzz_deps = [thread_dep, m_dep] + harfbuzz_extra_deps +libharfbuzz_link_language = 'c' + if conf.get('HAVE_FREETYPE', 0) == 1 hb_sources += hb_ft_sources hb_headers += hb_ft_headers @@ -351,12 +353,12 @@ if conf.get('HAVE_UNISCRIBE', 0) == 1 hb_headers += hb_uniscribe_headers endif -has_directwrite = false if conf.get('HAVE_DIRECTWRITE', 0) == 1 hb_sources += hb_directwrite_sources hb_headers += hb_directwrite_headers harfbuzz_deps += directwrite_dep - has_directwrite = true + # hb-directwrite needs a C++ linker + libharfbuzz_link_language = 'cpp' endif if conf.get('HAVE_CORETEXT', 0) == 1 @@ -410,12 +412,6 @@ endif darwin_versions = [hb_version_int, '@0@.0.0'.format(hb_version_int)] -libharfbuzz_link_language = 'c' -if has_directwrite - # hb-directwrite needs a C++ linker - libharfbuzz_link_language = 'cpp' -endif - libharfbuzz = library('harfbuzz', hb_sources, include_directories: incconfig, dependencies: harfbuzz_deps,