meson.build: Only use get_variable() on icu_dep with pkgconfig

We might have found ICU via the .lib names, and get_variable() is only
available for pkg-config deps.
This commit is contained in:
Chun-wei Fan 2022-02-10 16:30:36 +08:00 committed by Behdad Esfahbod
parent 52c536bb8d
commit 3d22dae5f8
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ if not get_option('icu').disabled()
endif
endif
if icu_dep.found()
if icu_dep.found() and icu_dep.type_name() == 'pkgconfig'
icu_defs = icu_dep.get_variable(pkgconfig: 'DEFS', default_value: '')
if icu_defs != ''
add_project_arguments(icu_defs, language: ['c', 'cpp'])