fix detection of gio/gdesktopappinfo.h

Header file gio/gdesktopappinfo.h is currently never found
by Meson because it's inside gio-unix-2.0 directory.

This bug was introduced by commit 13b94dab10 which
fixed the build for MacOS but caused the header file
to not be detected by Linux anymore.

One possible fix would be to replace 'gio/gdesktopappinfo.h'
with 'gio-unix-2.0/gio/gdesktopappinfo.h', but as it's a
unix only header we move the check to an appropiate place
where other unix specific handling is done.
This commit is contained in:
Nelson Benítez León
2023-11-12 21:45:18 +00:00
parent cc2d3fa7d6
commit 64a708559a

View File

@@ -176,7 +176,6 @@ check_headers = [
'sys/time.h', 'sys/time.h',
'sys/types.h', 'sys/types.h',
'unistd.h', 'unistd.h',
'gio/gdesktopappinfo.h'
] ]
foreach h : check_headers foreach h : check_headers
@@ -380,6 +379,9 @@ if os_win32
endif endif
if os_unix if os_unix
giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false) giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false)
if giounix_dep.found() and cc.has_header('gio/gdesktopappinfo.h', dependencies: giounix_dep)
cdata.set('HAVE_DESKTOPAPPINFO', 1)
endif
endif endif
gmodule_dep = dependency('gmodule-2.0', version: glib_req) gmodule_dep = dependency('gmodule-2.0', version: glib_req)
cairo_dep = dependency('cairo', version: cairo_req, cairo_dep = dependency('cairo', version: cairo_req,