meson: Use the standard dependency mechanism to find bzip2

This follows standard conventions in Meson by using the pkg-config file.
This change allows Conan to switch to the Meson build system.
This commit is contained in:
Jordan Williams 2024-03-04 12:14:51 -06:00
parent 2a790a9f49
commit 2cc589043e
No known key found for this signature in database
GPG Key ID: 9FB42B0E7F657D8C
1 changed files with 4 additions and 2 deletions

View File

@ -316,8 +316,10 @@ else
# BZip2 support
bzip2_dep = cc.find_library('bz2',
required: get_option('bzip2'))
bzip2_dep = dependency('bzip2', required: false)
if not bzip2_dep.found()
bzip2_dep = cc.find_library('bz2', has_headers: ['bzlib.h'], required: get_option('bzip2'))
if bzip2_dep.found()
ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BZIP2']