diff --git a/ChangeLog b/ChangeLog index d5521c3f1..57704cc06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2021-02-09 Xavier Claessens + + * meson.build (bzip2_dep): Simplify. + + We remove `static:false` from `find_library('bz2')`. + + I don't know whether the previous code was a workaround for an old + meson bug, but at least with version >=0.55.0 (which FreeType uses) + it picks the shared library when both are available. + + File `freetype2.pc` still contains the full path to file `libbz2.so` + instead of `-lbz2` – that we need to do this is a meson bug even + present in the current version (0.57.0). + 2021-02-09 Xavier Claessens * meson.build: Set project version. diff --git a/meson.build b/meson.build index dac0e6b11..243046cf1 100644 --- a/meson.build +++ b/meson.build @@ -250,14 +250,7 @@ else endif # BZip2 support -# -# IMPORTANT NOTE: Without `static: false` here, Meson will find both the -# static library version and the shared library version when they are -# installed on the system, and will try to link them *both* to the final -# library! -bzip2_dep = meson.get_compiler('c').find_library('bz2', - static: false, - required: get_option('bzip2')) +bzip2_dep = cc.find_library('bz2', required: get_option('bzip2')) if bzip2_dep.found() ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BZIP2'] ft2_sources += files(['src/bzip2/ftbzip2.c',])