mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
meson: fix libmng test.
The main problem was that file-mng would fail to build on Windows 32-bit even though the lib was detected. Actually this is because there are several possible calling conventions and this can be handled by defining the proper macro. This macro is well defined in the pkg-config file, but our build was not using it. So let's change the test to use pkg-config first. If this fails, we fallback to more basic method of finding the library. Additionally we augment this fallback test with a function check (as we do already in autotools) so that our configure test is reliable: we verify that the lib is there **and** that symbols are visible. Otherwise we'd end up with a successful configure test followed by a broken build (as until now in meson). See the nice explanation here and in next messages: https://github.com/msys2/MINGW-packages/issues/11136#issuecomment-1083711452
This commit is contained in:
@@ -658,7 +658,14 @@ libpng_minver = '1.6.25'
|
||||
libpng = dependency('libpng', version: '>='+libpng_minver)
|
||||
MIMEtypes += [ 'image/png', 'image/x-icon']
|
||||
|
||||
libmng = cc.find_library('mng', required: get_option('mng'))
|
||||
libmng = dependency('libmng', required: get_option('mng'))
|
||||
|
||||
if not libmng.found()
|
||||
libmng = cc.find_library('mng', required: get_option('mng'))
|
||||
if libmng.found() and not cc.has_function('mng_create', dependencies: libmng)
|
||||
libmng = no_dep
|
||||
endif
|
||||
endif
|
||||
|
||||
libaa = cc.find_library('aa', required: get_option('aa'))
|
||||
|
||||
|
Reference in New Issue
Block a user