diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-12-19 03:13:45 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-12-19 17:23:26 +0530 |
commit | 7954eed96054ad012ab5b331eddd1ecde703a52a (patch) | |
tree | 3d203cd5a3962f1968349d659edb4109208fc157 /meson.build | |
parent | 32115334662799c77d49b0e26161c44e580d5dd4 (diff) | |
download | pango-7954eed96054ad012ab5b331eddd1ecde703a52a.tar.gz |
meson: Always look for both cmake and pkgconfig names
The is_msvc_like change is wrong; it used a false correlation between
"compiler being used" and "dependency method" by saying that on
Windows, when building with MSVC, you will only use CMake to find
freetype.
You can use pkgconfig to find freetype on Windows with MSVC -- when
it has been built with meson (msvc). You can also find freetype
using CMake on other platforms like macOS or Linux.
The solution is simple: just search for both names on all platforms,
and just search for the pkgconfig name first.
This requires Meson 0.60
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/meson.build b/meson.build index a3103e96..78bdcb29 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project('pango', 'c', 'cpp', # https://github.com/mesonbuild/meson/issues/2289 'c_std=gnu99', ], - meson_version : '>= 0.55.3') + meson_version : '>= 0.60.0') add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_POSIX_THREAD_SAFE_FUNCTIONS', '-D_GNU_SOURCE', ], language: 'c') @@ -314,10 +314,7 @@ endif # The first version of freetype with a pkg-config file is 2.1.5, # CMake uses 'freetype' rather than 'freetype2' for the package name -freetype_package_name = cc.get_argument_syntax() == 'msvc' ? \ - 'freetype' : 'freetype2' - -freetype_dep = dependency(freetype_package_name, +freetype_dep = dependency('freetype2', 'freetype', required: freetype_option, fallback: ['freetype2', 'freetype_dep']) |