2 '-DG_LOG_DOMAIN="GLib-GIO"',
4 '-DGIO_MODULE_DIR="@0@"'.format(glib_giomodulesdir),
7 gio_c_args += glib_hidden_visibility_args
9 # FIXME: Install empty glib_giomodulesdir
11 gnetworking_h_conf = configuration_data()
13 gnetworking_h_nameser_compat_include = ''
15 if host_system != 'windows' and not host_system.contains('android')
16 # Don't check for C_IN on Android since it does not define it in public
17 # headers, we define it ourselves wherever necessary
18 if not cc.compiles('''#include <sys/types.h>
19 #include <arpa/nameser.h>
20 int qclass = C_IN;''',
21 name : 'C_IN in public headers (no arpa/nameser_compat.h needed)')
22 if cc.compiles('''#include <sys/types.h>
23 #include <arpa/nameser.h>
24 #include <arpa/nameser_compat.h>
25 int qclass = C_IN;''',
26 name : 'arpa/nameser_compat.h needed for C_IN')
27 gnetworking_h_nameser_compat_include = '#include <arpa/nameser_compat.h>'
29 error('Could not find required includes for ARPA C_IN')
36 if host_system != 'windows'
38 res_query_test = '''#include <resolv.h>
39 int main (int argc, char ** argv) {
40 return res_query("test", 0, 0, (void *)0, 0);
42 res_query_test_full = '''#include <sys/types.h>
43 #include <netinet/in.h>
44 #include <arpa/nameser.h>
46 if not cc.links(res_query_test_full, name : 'res_query()')
47 if cc.links(res_query_test_full, args : '-lresolv', name : 'res_query() in -lresolv')
48 network_libs += [ cc.find_library('resolv') ]
49 network_args += [ '-lresolv' ]
50 elif cc.links(res_query_test, args : '-lbind', name : 'res_query() in -lbind')
51 network_libs += [ cc.find_library('bind') ]
52 network_args += [ '-lbind' ]
54 error('Could not find res_query()')
59 socket_test = '''#include <sys/types.h>
60 #include <sys/socket.h>
61 int main (int argc, char ** argv) {
62 return socket(1, 2, 3);
64 if not cc.links(socket_test, name : 'socket()')
65 if cc.links(socket_test, args : '-lsocket', name : 'socket() in -lsocket')
66 network_libs += [ cc.find_library('socket') ]
67 network_args += [ '-lsocket' ]
69 error('Could not find socket()')
74 if cc.links('''#include <sys/types.h>
75 #include <netinet/in.h>
76 #include <arpa/nameser.h>
78 int main (int argc, char ** argv) {
80 }''', args : network_args, name : 'res_init()')
81 glib_conf.set('HAVE_RES_INIT', 1)
85 if cc.links('''#include <sys/types.h>
86 #include <netinet/in.h>
87 #include <arpa/nameser.h>
89 int main (int argc, char ** argv) {
90 struct __res_state res;
93 }''', args : network_args, name : 'res_nclose()')
94 glib_conf.set('HAVE_RES_NCLOSE', 1)
98 if cc.links('''#include <sys/types.h>
99 #include <netinet/in.h>
100 #include <arpa/nameser.h>
102 int main (int argc, char ** argv) {
103 struct __res_state res;
106 }''', args : network_args, name : 'res_ndestroy()')
107 glib_conf.set('HAVE_RES_NDESTROY', 1)
111 if cc.links('''#include <sys/types.h>
112 #include <netinet/in.h>
113 #include <arpa/nameser.h>
115 int main (int argc, char ** argv) {
116 struct __res_state res;
117 return res_ninit(&res);
118 }''', args : network_args, name : 'res_ninit()')
119 glib_conf.set('HAVE_RES_NINIT', 1)
123 if cc.links('''#include <sys/types.h>
124 #include <netinet/in.h>
125 #include <arpa/nameser.h>
127 int main (int argc, char ** argv) {
128 struct __res_state res;
129 return res_nquery(&res, "test", 0, 0, (void *)0, 0);
130 }''', args : network_args, name : 'res_nquery()')
131 glib_conf.set('HAVE_RES_NQUERY', 1)
134 if cc.has_type('struct ip_mreqn', prefix : '#include <netinet/in.h>')
135 glib_conf.set('HAVE_IP_MREQN', 1)
138 if cc.compiles('''#include <sys/ioctl.h>
140 int main (int argc, char ** argv) {
142 ioctl(0, SIOCGIFADDR, &ifr);
145 name : 'ioctl with request SIOCGIFADDR')
146 glib_conf.set('HAVE_SIOCGIFADDR', '/**/')
151 if host_system.contains('android')
152 # struct ip_mreq_source definition is broken on Android NDK <= r16
153 # See https://bugzilla.gnome.org/show_bug.cgi?id=740791
154 if not cc.compiles('''#include <netinet/in.h>
155 int main(int argc, char ** argv) {
156 struct ip_mreq_source mc_req_src;
157 mc_req_src.imr_interface.s_addr = 0;
160 name : 'ip_mreq_source.imr_interface has s_addr member')
161 glib_conf.set('BROKEN_IP_MREQ_SOURCE_STRUCT', 1)
165 gnetworking_h_conf.set('NAMESER_COMPAT_INCLUDE', gnetworking_h_nameser_compat_include)
167 gnetworking_h = configure_file(input : 'gnetworking.h.in',
168 output : 'gnetworking.h',
169 install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
170 configuration : gnetworking_h_conf)
172 gdbus_headers = files(
173 'gdbusauthobserver.h',
181 'gdbusnamewatching.h',
183 'gdbusintrospection.h',
184 'gdbusmethodinvocation.h',
187 'gdbusinterfaceskeleton.h',
189 'gdbusobjectskeleton.h',
190 'gdbusobjectproxy.h',
191 'gdbusobjectmanager.h',
192 'gdbusobjectmanagerclient.h',
193 'gdbusobjectmanagerserver.h',
197 gdbus_sources = files(
200 'gdbusauthobserver.c',
202 'gdbusauthmechanism.c',
203 'gdbusauthmechanismanon.c',
204 'gdbusauthmechanismexternal.c',
205 'gdbusauthmechanismsha1.c',
210 'gdbusnamewatching.c',
213 'gdbusintrospection.c',
214 'gdbusmethodinvocation.c',
217 'gdbusinterfaceskeleton.c',
219 'gdbusobjectskeleton.c',
220 'gdbusobjectproxy.c',
221 'gdbusobjectmanager.c',
222 'gdbusobjectmanagerclient.c',
223 'gdbusobjectmanagerserver.c',
227 # Generate gdbus-codegen
228 subdir('gdbus-2.0/codegen')
230 # Generate xdp-dbus.{c,h}
231 xdp_dbus_generated = custom_target('xdp-dbus',
232 input : ['org.freedesktop.portal.Documents.xml',
233 'org.freedesktop.portal.OpenURI.xml',
234 'org.freedesktop.portal.ProxyResolver.xml',
235 'org.freedesktop.portal.Trash.xml'],
236 output : ['xdp-dbus.h', 'xdp-dbus.c'],
237 depend_files : gdbus_codegen_built_files,
238 command : [python, gdbus_codegen,
239 '--interface-prefix', 'org.freedesktop.portal.',
240 '--output-directory', '@OUTDIR@',
241 '--generate-c-code', 'xdp-dbus',
242 '--c-namespace', 'GXdp',
245 # Generate gdbus-generated.{c,h}
246 gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
247 input : ['dbus-daemon.xml'],
248 output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
249 depend_files : gdbus_codegen_built_files,
250 command : [python, gdbus_codegen,
251 '--interface-prefix', 'org.',
252 '--output-directory', '@OUTDIR@',
253 '--generate-c-code', 'gdbus-daemon-generated',
254 '--c-namespace', '_G', '@INPUT@'])
256 settings_headers = files(
257 'gsettingsbackend.h',
262 settings_sources = files(
263 'gvdb/gvdb-reader.c',
264 'gdelayedsettingsbackend.c',
265 'gkeyfilesettingsbackend.c',
266 'gmemorysettingsbackend.c',
267 'gnullsettingsbackend.c',
268 'gsettingsbackend.c',
270 'gsettings-mapping.c',
274 if host_system == 'windows'
275 settings_sources += files('gregistrysettingsbackend.c')
278 application_headers = files(
280 'gapplicationcommandline.h',
284 'gsimpleactiongroup.h',
285 'gremoteactiongroup.h',
286 'gactiongroupexporter.h',
287 'gdbusactiongroup.h',
299 application_sources = files(
301 'gapplicationcommandline.c',
302 'gapplicationimpl-dbus.c',
306 'gsimpleactiongroup.c',
307 'gremoteactiongroup.c',
308 'gactiongroupexporter.c',
309 'gdbusactiongroup.c',
319 'gnotificationbackend.c',
322 local_sources = files(
325 'glocalfileenumerator.c',
327 'glocalfileinputstream.c',
328 'glocalfilemonitor.c',
329 'glocalfileoutputstream.c',
330 'glocalfileiostream.c',
335 'thumbnail-verify.c',
340 # TODO: internal_objects is a workaround for
341 # <https://github.com/mesonbuild/meson/issues/3934> and
342 # <https://github.com/mesonbuild/meson/issues/3937>. When we can depend
343 # on a meson version where those are fixed, revert the commit that
344 # introduced this workaround.
345 internal_objects = []
347 contenttype_sources = []
352 # This is also used by tests/gdbus-daemon, so use files() to include the path
353 gdbus_daemon_sources = [
354 files('gdbusdaemon.c'),
355 gdbus_daemon_generated,
358 if host_system != 'windows'
359 unix_sources = files(
360 'gfiledescriptorbased.c',
362 'gunixcredentialsmessage.c',
367 'gunixsocketaddress.c',
369 'gunixvolumemonitor.c',
370 'gunixinputstream.c',
371 'gunixoutputstream.c',
372 'gfdonotificationbackend.c',
373 'ggtknotificationbackend.c',
376 portal_sources = [files(
379 'gmemorymonitorportal.c',
380 'gnetworkmonitorportal.c',
381 'gproxyresolverportal.c',
384 'gportalnotificationbackend.c'),
388 gio_unix_include_headers = files(
389 'gfiledescriptorbased.h',
391 'gunixcredentialsmessage.h',
395 'gunixinputstream.h',
396 'gunixoutputstream.h',
397 'gunixsocketaddress.h',
401 settings_sources += files('gnextstepsettingsbackend.m')
402 contenttype_sources += files('gosxcontenttype.m')
403 appinfo_sources += files('gosxappinfo.m')
404 if glib_have_os_x_9_or_later
405 unix_sources += files('gcocoanotificationbackend.m')
407 application_headers += files('gosxappinfo.h')
409 contenttype_sources += files('gcontenttype.c')
410 appinfo_sources += files('gdesktopappinfo.c')
411 gio_unix_include_headers += files('gdesktopappinfo.h')
415 internal_deps += [xdgmime_lib]
416 internal_objects += [xdgmime_lib.extract_all_objects()]
418 install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
420 if glib_conf.has('HAVE_NETLINK')
421 unix_sources += files(
422 'gnetworkmonitornetlink.c',
423 'gnetworkmonitornm.c',
427 appinfo_sources += files('gwin32appinfo.c')
428 contenttype_sources += files('gcontenttype-win32.c')
429 platform_deps += [cc.find_library('shlwapi'),
430 cc.find_library('dnsapi'),
433 win32_sources += files(
434 'gwin32registrykey.c',
436 'gwin32volumemonitor.c',
437 'gwin32inputstream.c',
438 'gwin32outputstream.c',
439 'gwin32networkmonitor.c',
440 'gwin32networkmonitor.h',
441 'gwin32notificationbackend.c',
444 gio_win_rc = configure_file(
447 configuration: glibconfig_conf,
449 gio_win_res = windows.compile_resources(gio_win_rc)
450 win32_sources += [gio_win_res]
452 gio_win32_include_headers = files(
453 'gwin32inputstream.h',
454 'gwin32outputstream.h',
456 install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio')
464 'gbufferedinputstream.c',
465 'gbufferedoutputstream.c',
468 'gcharsetconverter.c',
469 'gcontextspecificgroup.c',
471 'gconverterinputstream.c',
472 'gconverteroutputstream.c',
475 'gdatainputstream.c',
476 'gdataoutputstream.c',
479 'gdummyproxyresolver.c',
480 'gdummytlsbackend.c',
488 'gfileinputstream.c',
490 'gfilenamecompleter.c',
491 'gfileoutputstream.c',
493 'gfilterinputstream.c',
494 'gfilteroutputstream.c',
497 'ginetaddressmask.c',
498 'ginetsocketaddress.c',
507 'gmarshal-internal.c',
510 'gmemorymonitordbus.c',
511 'gmemoryinputstream.c',
512 'gmemoryoutputstream.c',
514 'gnativesocketaddress.c',
515 'gnativevolumemonitor.c',
519 'gnetworkmonitorbase.c',
523 'gpollableinputstream.c',
524 'gpollableoutputstream.c',
526 'gpollfilemonitor.c',
529 'gproxyaddressenumerator.c',
535 'gsimpleasyncresult.c',
537 'gsimplepermission.c',
538 'gsimpleproxyresolver.c',
541 'gsocketaddressenumerator.c',
543 'gsocketconnectable.c',
544 'gsocketconnection.c',
545 'gsocketcontrolmessage.c',
546 'gsocketinputstream.c',
548 'gsocketoutputstream.c',
551 'gsubprocesslauncher.c',
555 'gtcpwrapperconnection.c',
557 'gthreadedsocketservice.c',
558 'gthreadedresolver.c',
559 'gthreadedresolver.h',
562 'gtlsclientconnection.c',
565 'gtlsfiledatabase.c',
568 'gtlsserverconnection.c',
570 'gdtlsclientconnection.c',
571 'gdtlsserverconnection.c',
572 'gunionvolumemonitor.c',
577 'gzlibdecompressor.c',
582 gio_sources += appinfo_sources
583 gio_sources += contenttype_sources
584 gio_sources += gdbus_daemon_sources
585 gio_sources += unix_sources
586 gio_sources += win32_sources
587 gio_sources += application_sources
588 gio_sources += settings_sources
589 gio_sources += gdbus_sources
590 gio_sources += portal_sources
591 gio_sources += local_sources
594 # This is read by gobject-introspection/misc/ and gtk-doc
595 gio-public-headers.txt: Makefile
596 '$(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
598 gio.def: libgio-2.0.la
599 '$(AM_V_GEN) dumpbin.exe -exports .libs/libgio-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gio.def.tmp && mv gio.def.tmp gio.def
601 gio-2.0.lib: libgio-2.0.la gio.def
602 '$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
609 'gbufferedinputstream.h',
610 'gbufferedoutputstream.h',
614 'gcharsetconverter.h',
616 'gconverterinputstream.h',
617 'gconverteroutputstream.h',
619 'gdatainputstream.h',
620 'gdataoutputstream.h',
629 'gfileinputstream.h',
631 'gfilenamecompleter.h',
632 'gfileoutputstream.h',
634 'gfilterinputstream.h',
635 'gfilteroutputstream.h',
638 'ginetaddressmask.h',
639 'ginetsocketaddress.h',
643 'gio-autocleanups.h',
652 'gmemoryinputstream.h',
654 'gmemoryoutputstream.h',
656 'gnativesocketaddress.h',
657 'gnativevolumemonitor.h',
663 'gpollableinputstream.h',
664 'gpollableoutputstream.h',
668 'gproxyaddressenumerator.h',
673 'gsimpleasyncresult.h',
675 'gsimplepermission.h',
676 'gsimpleproxyresolver.h',
679 'gsocketaddressenumerator.h',
681 'gsocketconnectable.h',
682 'gsocketconnection.h',
683 'gsocketcontrolmessage.h',
688 'gsubprocesslauncher.h',
691 'gtcpwrapperconnection.h',
693 'gthreadedsocketservice.h',
696 'gtlsclientconnection.h',
699 'gtlsfiledatabase.h',
702 'gtlsserverconnection.h',
704 'gdtlsclientconnection.h',
705 'gdtlsserverconnection.h',
710 'gzlibdecompressor.h',
715 gio_headers += application_headers
716 gio_headers += settings_headers
717 gio_headers += gdbus_headers
718 install_headers(gio_headers, subdir : 'glib-2.0/gio/')
720 # We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums
721 # in PATH, which means you can't bootstrap glib with its own glib-mkenums.
722 gioenumtypes_h = custom_target('gioenumtypes_h',
723 output : 'gioenumtypes.h',
727 install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
728 command : [python, glib_mkenums,
729 '--template', files('gioenumtypes.h.template'),
730 '@INPUT@', gnetworking_h])
732 gioenumtypes_c = custom_target('gioenumtypes_c',
733 output : 'gioenumtypes.c',
736 depends : [gioenumtypes_h],
737 command : [python, glib_mkenums,
738 '--template', files('gioenumtypes.c.template'),
739 '@INPUT@', gnetworking_h])
741 gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h])
744 if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1
746 internal_deps += [ inotify_lib ]
747 internal_objects += [inotify_lib.extract_all_objects()]
751 if have_func_kqueue and have_func_kevent
753 internal_deps += [ kqueue_lib ]
754 internal_objects += [kqueue_lib.extract_all_objects()]
757 if host_system == 'windows'
759 internal_deps += [ giowin32_lib ]
760 internal_objects += [giowin32_lib.extract_all_objects()]
765 'completion/gapplication',
768 'completion/gsettings',
769 'completion/gresource'
771 install_dir: join_paths(get_option('datadir'), 'bash-completion/completions'))
775 gio_dtrace_obj = dtrace_obj_gen.process('gio_probes.d')
776 gio_dtrace_hdr = dtrace_hdr_gen.process('gio_probes.d')
782 libgio = library('gio-2.0',
783 gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
784 gio_dtrace_hdr, gio_dtrace_obj,
785 objects : internal_objects,
786 version : library_version,
787 soversion : soversion,
788 darwin_versions : darwin_versions,
790 include_directories : [configinc, gioinc],
791 # '$(gio_win32_res_ldflag)',
792 dependencies : [libz_dep, libdl_dep, libmount_dep, libglib_dep,
793 libgobject_dep, libgmodule_dep, selinux_dep, xattr_dep,
794 platform_deps, network_libs],
796 objc_args : gio_c_args,
797 # intl.lib is not compatible with SAFESEH
798 link_args : [noseh_link_args, glib_link_flags],
801 if get_option('gio_module_dir') != ''
802 pkgconfig_giomodulesdir = join_paths('${prefix}', get_option('gio_module_dir'))
804 pkgconfig_giomodulesdir = join_paths('${libdir}', 'gio', 'modules')
807 schemas_subdir = join_paths('glib-2.0', 'schemas')
809 libgio_dep = declare_dependency(link_with : libgio,
810 dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
811 include_directories : [gioinc])
814 libraries_private : [osx_ldflags],
815 requires : ['glib-2.0', 'gobject-2.0'],
816 variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')),
817 'schemasdir=' + join_paths('${datadir}', schemas_subdir),
818 'bindir=' + join_paths('${prefix}', get_option('bindir')),
819 'giomoduledir=' + pkgconfig_giomodulesdir,
820 'gio=' + join_paths('${bindir}', 'gio'),
821 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'),
822 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'),
823 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'),
824 'gdbus=' + join_paths('${bindir}', 'gdbus'),
825 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'),
826 'gresource=' + join_paths('${bindir}', 'gresource'),
827 'gsettings=' + join_paths('${bindir}', 'gsettings')],
828 version : glib_version,
829 install_dir : glib_pkgconfigreldir,
830 filebase : 'gio-2.0',
832 description : 'glib I/O library',
835 if meson.version().version_compare('>=0.54.0')
836 meson.override_dependency('gio-2.0', libgio_dep)
840 if host_system == 'windows'
841 pkg.generate(requires : ['gobject-2.0', 'gmodule-no-export-2.0', 'gio-2.0'],
842 subdirs : ['gio-win32-2.0'],
843 version : glib_version,
844 install_dir : glib_pkgconfigreldir,
845 filebase : 'gio-windows-2.0',
846 name : 'GIO Windows specific APIs',
847 description : 'Windows specific headers for glib I/O library',
849 if meson.version().version_compare('>=0.54.0')
850 meson.override_dependency('gio-win32-2.0', libgio_dep)
853 pkg.generate(requires : ['gobject-2.0', 'gio-2.0'],
854 subdirs : ['gio-unix-2.0'],
855 version : glib_version,
856 install_dir : glib_pkgconfigreldir,
857 filebase : 'gio-unix-2.0',
858 name : 'GIO unix specific APIs',
859 description : 'unix specific headers for glib I/O library',
861 if meson.version().version_compare('>=0.54.0')
862 meson.override_dependency('gio-unix-2.0', libgio_dep)
866 if host_system == 'windows'
867 # Hack till https://github.com/mesonbuild/meson/issues/2324 is fixed
868 libgiounix_dep = dependency('', required : false)
869 libgiowin32_dep = libgio_dep
871 libgiowin32_dep = dependency('', required : false)
872 libgiounix_dep = libgio_dep
875 # Dependencies used by executables below
877 libelf = dependency('libelf', version : '>= 0.8.12', required : false)
881 # This fallback is necessary on *BSD. elfutils isn't the only libelf
882 # implementation, and *BSD usually includes their own libelf as a system
883 # library which doesn't have a corresponding .pc file.
884 libelf = cc.find_library('elf', required : false)
885 have_libelf = libelf.found()
886 have_libelf = have_libelf and cc.has_function('elf_begin', dependencies : libelf)
887 have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf)
888 have_libelf = have_libelf and cc.has_function('elf_getshdrnum', dependencies : libelf)
889 have_libelf = have_libelf and cc.has_header('libelf.h')
893 glib_conf.set('HAVE_LIBELF', 1)
898 gconstructor_as_data_h = custom_target('gconstructor_as_data.h',
899 input : ['data-to-c.py', files('../glib/gconstructor.h')],
900 output : ['gconstructor_as_data.h'],
901 command : [python, '@INPUT0@', '@INPUT1@', 'gconstructor_code', '@OUTPUT@'])
903 # Several installed executables
913 'gio-tool-monitor.c',
925 executable('gio', gio_tool_sources,
928 # intl.lib is not compatible with SAFESEH
929 link_args : noseh_link_args,
930 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
932 executable('gresource', 'gresource-tool.c',
934 # intl.lib is not compatible with SAFESEH
935 link_args : noseh_link_args,
936 dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
938 gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
941 # intl.lib is not compatible with SAFESEH
942 link_args : noseh_link_args,
943 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
945 glib_compile_schemas = executable('glib-compile-schemas',
946 [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-schemas.c'],
948 # intl.lib is not compatible with SAFESEH
949 link_args : noseh_link_args,
950 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
952 glib_compile_resources = executable('glib-compile-resources',
953 [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-resources.c'],
956 # intl.lib is not compatible with SAFESEH
957 link_args : noseh_link_args,
958 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
960 # Cannot override those programs in cross compilation case because they are
961 # native executables that cannot be run on the build machine.
962 # See https://gitlab.gnome.org/GNOME/glib/issues/1859.
963 if not meson.is_cross_build()
964 meson.override_find_program('glib-compile-schemas', glib_compile_schemas)
965 meson.override_find_program('glib-compile-resources', glib_compile_resources)
968 executable('gsettings', 'gsettings-tool.c',
971 # intl.lib is not compatible with SAFESEH
972 link_args : noseh_link_args,
973 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
974 install_data('gschema.dtd',
975 install_dir : join_paths(get_option('datadir'), schemas_subdir))
977 install_data(['gschema.loc', 'gschema.its'],
978 install_dir : join_paths(get_option('datadir'), 'gettext/its'))
980 executable('gdbus', 'gdbus-tool.c',
983 # intl.lib is not compatible with SAFESEH
984 link_args : noseh_link_args,
985 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
987 if host_system != 'windows' and not glib_have_cocoa
988 executable('gapplication', 'gapplication-tool.c',
991 # intl.lib is not compatible with SAFESEH
992 link_args : noseh_link_args,
993 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
997 gio_stp = configure_file(input : 'gio.stp.in',
998 output : '@0@.stp'.format(libgio.full_path().split('/').get(-1)),
999 configuration : stp_cdata,
1000 install_dir : tapset_install_dir,
1009 # The following is an example for building internal marshallers that are used
1010 # by GIO. We cannot guarantee glib-genmarshal availability while building GLib
1011 # so they are pre-generated and placed into gmarshal-internal.[ch].
1013 # gmarshal_internal = gnome.genmarshal('gmarshal-internal',
1014 # sources: 'gmarshal-internal.list',
1015 # prefix: '_g_cclosure_marshal',
1016 # valist_marshallers: true,