| 
									
										
										
										
											2022-10-24 14:13:04 +02:00
										 |  |  | gobject_includedir = glib_includedir / 'gobject'
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-22 14:11:11 +05:30
										 |  |  | gobject_install_headers = files(
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  |   'gobject-autocleanups.h',
 | 
					
						
							|  |  |  |   'glib-types.h',
 | 
					
						
							|  |  |  |   'gbinding.h',
 | 
					
						
							| 
									
										
										
										
											2021-08-26 16:32:32 -07:00
										 |  |  |   'gbindinggroup.h',
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  |   'gboxed.h',
 | 
					
						
							|  |  |  |   'gclosure.h',
 | 
					
						
							|  |  |  |   'genums.h',
 | 
					
						
							|  |  |  |   'gmarshal.h',
 | 
					
						
							|  |  |  |   'gobject.h',
 | 
					
						
							|  |  |  |   'gparam.h',
 | 
					
						
							|  |  |  |   'gparamspecs.h',
 | 
					
						
							|  |  |  |   'gsignal.h',
 | 
					
						
							| 
									
										
										
										
											2021-08-27 13:01:00 -07:00
										 |  |  |   'gsignalgroup.h',
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  |   'gsourceclosure.h',
 | 
					
						
							|  |  |  |   'gtype.h',
 | 
					
						
							|  |  |  |   'gtypemodule.h',
 | 
					
						
							|  |  |  |   'gtypeplugin.h',
 | 
					
						
							|  |  |  |   'gvalue.h',
 | 
					
						
							|  |  |  |   'gvaluearray.h',
 | 
					
						
							|  |  |  |   'gvaluecollector.h',
 | 
					
						
							|  |  |  |   'gvaluetypes.h',
 | 
					
						
							|  |  |  |   'gobjectnotifyqueue.c', # sic
 | 
					
						
							| 
									
										
										
										
											2017-11-22 14:11:11 +05:30
										 |  |  | )
 | 
					
						
							| 
									
										
										
										
											2022-10-03 10:36:04 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-20 00:27:53 +02:00
										 |  |  | gobject_sources = []
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-08 00:20:50 +00:00
										 |  |  | gobject_visibility_h = custom_target(
 | 
					
						
							| 
									
										
										
										
											2022-10-03 10:36:04 -04:00
										 |  |  |   output: 'gobject-visibility.h',
 | 
					
						
							|  |  |  |   command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GOBJECT', '@OUTPUT@'],
 | 
					
						
							| 
									
										
										
										
											2022-10-20 00:27:53 +02:00
										 |  |  |   install: true,
 | 
					
						
							| 
									
										
										
										
											2022-10-24 14:13:04 +02:00
										 |  |  |   install_dir: gobject_includedir,
 | 
					
						
							| 
									
										
										
										
											2022-10-03 10:36:04 -04:00
										 |  |  | )
 | 
					
						
							| 
									
										
										
										
											2023-01-08 00:20:50 +00:00
										 |  |  | gobject_sources += gobject_visibility_h
 | 
					
						
							| 
									
										
										
										
											2022-10-03 10:36:04 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-24 14:13:04 +02:00
										 |  |  | install_headers(gobject_install_headers, install_dir : gobject_includedir)
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-20 00:27:53 +02:00
										 |  |  | gobject_sources += files(
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  |   'gatomicarray.c',
 | 
					
						
							|  |  |  |   'gbinding.c',
 | 
					
						
							| 
									
										
										
										
											2021-08-26 16:32:32 -07:00
										 |  |  |   'gbindinggroup.c',
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  |   'gboxed.c',
 | 
					
						
							|  |  |  |   'gclosure.c',
 | 
					
						
							|  |  |  |   'genums.c',
 | 
					
						
							|  |  |  |   'gmarshal.c',
 | 
					
						
							|  |  |  |   'gobject.c',
 | 
					
						
							|  |  |  |   'gparam.c',
 | 
					
						
							|  |  |  |   'gparamspecs.c',
 | 
					
						
							|  |  |  |   'gsignal.c',
 | 
					
						
							| 
									
										
										
										
											2021-08-27 13:01:00 -07:00
										 |  |  |   'gsignalgroup.c',
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  |   'gsourceclosure.c',
 | 
					
						
							|  |  |  |   'gtype.c',
 | 
					
						
							|  |  |  |   'gtypemodule.c',
 | 
					
						
							|  |  |  |   'gtypeplugin.c',
 | 
					
						
							|  |  |  |   'gvalue.c',
 | 
					
						
							|  |  |  |   'gvaluearray.c',
 | 
					
						
							|  |  |  |   'gvaluetransform.c',
 | 
					
						
							|  |  |  |   'gvaluetypes.c',
 | 
					
						
							| 
									
										
										
										
											2017-11-22 14:11:11 +05:30
										 |  |  | )
 | 
					
						
							| 
									
										
										
										
											2016-03-07 11:13:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-20 00:51:34 +02:00
										 |  |  | if host_system == 'windows' and glib_build_shared
 | 
					
						
							| 
									
										
										
										
											2017-12-14 13:32:56 +01:00
										 |  |  |   gobject_win_rc = configure_file(
 | 
					
						
							|  |  |  |     input: 'gobject.rc.in',
 | 
					
						
							|  |  |  |     output: 'gobject.rc',
 | 
					
						
							|  |  |  |     configuration: glibconfig_conf,
 | 
					
						
							|  |  |  |   )
 | 
					
						
							|  |  |  |   gobject_win_res = windows.compile_resources(gobject_win_rc)
 | 
					
						
							|  |  |  |   gobject_sources += [gobject_win_res]
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-25 17:02:51 +00:00
										 |  |  | if enable_dtrace
 | 
					
						
							|  |  |  |   gobject_dtrace_obj = dtrace_obj_gen.process('gobject_probes.d')
 | 
					
						
							|  |  |  |   gobject_dtrace_hdr = dtrace_hdr_gen.process('gobject_probes.d')
 | 
					
						
							|  |  |  | else
 | 
					
						
							|  |  |  |   gobject_dtrace_obj = []
 | 
					
						
							|  |  |  |   gobject_dtrace_hdr = []
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-17 10:54:28 +01:00
										 |  |  | python_tools = [
 | 
					
						
							|  |  |  |   'glib-genmarshal',
 | 
					
						
							|  |  |  |   'glib-mkenums',
 | 
					
						
							|  |  |  | ]
 | 
					
						
							| 
									
										
										
										
											2016-12-21 04:07:24 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-17 10:54:28 +01:00
										 |  |  | python_tools_conf = configuration_data()
 | 
					
						
							|  |  |  | python_tools_conf.set('VERSION', glib_version)
 | 
					
						
							| 
									
										
										
										
											2024-11-09 17:05:17 -05:00
										 |  |  | python_tools_conf.set('PYTHON', python_shebang)
 | 
					
						
							| 
									
										
										
										
											2017-07-17 10:54:28 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | foreach tool: python_tools
 | 
					
						
							|  |  |  |   tool_bin = configure_file(
 | 
					
						
							|  |  |  |     input : tool + '.in',
 | 
					
						
							|  |  |  |     output : tool,
 | 
					
						
							|  |  |  |     configuration : python_tools_conf,
 | 
					
						
							|  |  |  |     install_dir : glib_bindir,
 | 
					
						
							| 
									
										
										
										
											2022-09-09 13:56:35 -04:00
										 |  |  |     install_tag : 'bin-devel',
 | 
					
						
							| 
									
										
										
										
											2017-07-17 10:54:28 +01:00
										 |  |  |   )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   # Set variables for later use
 | 
					
						
							|  |  |  |   set_variable(tool.underscorify(), tool_bin)
 | 
					
						
							| 
									
										
										
										
											2018-07-19 15:53:37 +05:30
										 |  |  |   # Provide tools for others when we're a subproject and they use the Meson GNOME module
 | 
					
						
							|  |  |  |   meson.override_find_program(tool, tool_bin)
 | 
					
						
							| 
									
										
										
										
											2017-07-17 10:54:28 +01:00
										 |  |  | endforeach
 | 
					
						
							| 
									
										
										
										
											2016-12-21 04:07:24 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-04 11:12:59 +00:00
										 |  |  | # Generate a header file containing the GObject enum types for the enums defined
 | 
					
						
							|  |  |  | # in libglib.
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # For now, we only include gunicode.h here, since GScriptType is needed for
 | 
					
						
							|  |  |  | # Pango. More headers can be added as needed in future.
 | 
					
						
							| 
									
										
										
										
											2022-11-24 12:06:10 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | # We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums
 | 
					
						
							|  |  |  | # in PATH, which means you can't bootstrap glib with its own glib-mkenums.
 | 
					
						
							| 
									
										
										
										
											2019-03-04 11:12:59 +00:00
										 |  |  | glib_enumtypes_input_headers = files(
 | 
					
						
							|  |  |  |   '../glib/gunicode.h',
 | 
					
						
							|  |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-24 12:06:10 +00:00
										 |  |  | glib_enumtypes_h = custom_target('glib_enumtypes_h',
 | 
					
						
							|  |  |  |   output : 'glib-enumtypes.h',
 | 
					
						
							|  |  |  |   capture : true,
 | 
					
						
							|  |  |  |   input : glib_enumtypes_input_headers,
 | 
					
						
							|  |  |  |   install : true,
 | 
					
						
							| 
									
										
										
										
											2018-11-19 15:10:09 -05:00
										 |  |  |   install_dir : join_paths(get_option('includedir'), 'glib-2.0/gobject'),
 | 
					
						
							| 
									
										
										
										
											2022-11-24 12:06:10 +00:00
										 |  |  |   install_tag: 'devel',
 | 
					
						
							|  |  |  |   command : [python, glib_mkenums,
 | 
					
						
							|  |  |  |              '--template', files('glib-enumtypes.h.template'),
 | 
					
						
							|  |  |  |              '@INPUT@'])
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | glib_enumtypes_c = custom_target('glib_enumtypes_c',
 | 
					
						
							|  |  |  |   output : 'glib-enumtypes.c',
 | 
					
						
							|  |  |  |   capture : true,
 | 
					
						
							|  |  |  |   input : glib_enumtypes_input_headers,
 | 
					
						
							|  |  |  |   depends : [glib_enumtypes_h],
 | 
					
						
							|  |  |  |   command : [python, glib_mkenums,
 | 
					
						
							|  |  |  |              '--template', files('glib-enumtypes.c.template'),
 | 
					
						
							|  |  |  |              '@INPUT@'])
 | 
					
						
							| 
									
										
										
										
											2018-11-19 15:10:09 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-28 14:54:22 +01:00
										 |  |  | # Expose as variable to be used by gobject-introspection
 | 
					
						
							|  |  |  | # when it includes GLib as a subproject
 | 
					
						
							|  |  |  | glib_types_h = files('glib-types.h')
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-19 15:10:09 -05:00
										 |  |  | libgobject = library('gobject-2.0',
 | 
					
						
							| 
									
										
										
										
											2022-11-24 12:06:10 +00:00
										 |  |  |   gobject_dtrace_obj, gobject_dtrace_hdr, glib_enumtypes_h, glib_enumtypes_c,
 | 
					
						
							| 
									
										
										
										
											2018-11-19 15:10:09 -05:00
										 |  |  |   sources : gobject_sources,
 | 
					
						
							|  |  |  |   version : library_version,
 | 
					
						
							|  |  |  |   soversion : soversion,
 | 
					
						
							|  |  |  |   darwin_versions : darwin_versions,
 | 
					
						
							|  |  |  |   install : true,
 | 
					
						
							|  |  |  |   include_directories : [configinc],
 | 
					
						
							|  |  |  |   dependencies : [libffi_dep, libglib_dep],
 | 
					
						
							| 
									
										
										
										
											2025-04-11 17:05:46 +01:00
										 |  |  |   c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION', warning_sign_conversion_args],
 | 
					
						
							| 
									
										
										
										
											2022-10-03 10:36:04 -04:00
										 |  |  |   gnu_symbol_visibility : 'hidden',
 | 
					
						
							| 
									
										
										
										
											2018-11-19 15:10:09 -05:00
										 |  |  |   link_args : glib_link_flags,
 | 
					
						
							|  |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pkg.generate(libgobject,
 | 
					
						
							|  |  |  |   requires : ['glib-2.0'],
 | 
					
						
							|  |  |  |   version : glib_version,
 | 
					
						
							|  |  |  |   install_dir : glib_pkgconfigreldir,
 | 
					
						
							|  |  |  |   filebase : 'gobject-2.0',
 | 
					
						
							|  |  |  |   name : 'GObject',
 | 
					
						
							|  |  |  |   description : 'GLib Type, Object, Parameter and Signal Library',
 | 
					
						
							|  |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-20 02:17:01 +01:00
										 |  |  | libgobject_dep = declare_dependency(link_with : libgobject,
 | 
					
						
							|  |  |  |   include_directories : [gobjectinc],
 | 
					
						
							|  |  |  |   sources : [gobject_visibility_h, glib_enumtypes_h],
 | 
					
						
							|  |  |  |   dependencies : [libglib_dep],
 | 
					
						
							|  |  |  | )
 | 
					
						
							|  |  |  | meson.override_dependency('gobject-2.0', libgobject_dep)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-25 18:49:03 +02:00
										 |  |  | gobject_query = executable('gobject-query', 'gobject-query.c',
 | 
					
						
							| 
									
										
										
										
											2016-12-21 04:07:24 +05:30
										 |  |  |   install : true,
 | 
					
						
							| 
									
										
										
										
											2022-09-09 13:56:35 -04:00
										 |  |  |   install_tag : 'bin-devel',
 | 
					
						
							| 
									
										
										
										
											2016-12-21 04:07:24 +05:30
										 |  |  |   dependencies : [libglib_dep, libgobject_dep])
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-18 16:51:55 -04:00
										 |  |  | install_data('gobject_gdb.py',
 | 
					
						
							|  |  |  |   install_dir : glib_pkgdatadir / 'gdb',
 | 
					
						
							|  |  |  |   install_tag : 'devel',
 | 
					
						
							|  |  |  | )
 | 
					
						
							| 
									
										
										
										
											2016-12-06 08:07:03 -05:00
										 |  |  | gdb_conf = configuration_data()
 | 
					
						
							|  |  |  | gdb_conf.set('datadir', glib_datadir)
 | 
					
						
							|  |  |  | configure_file(
 | 
					
						
							|  |  |  |   input: 'libgobject-gdb.py.in',
 | 
					
						
							|  |  |  |   output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
 | 
					
						
							|  |  |  |   configuration: gdb_conf,
 | 
					
						
							| 
									
										
										
										
											2017-11-02 10:22:39 +05:30
										 |  |  |   install_dir: gdb_install_dir,
 | 
					
						
							| 
									
										
										
										
											2022-09-18 16:51:55 -04:00
										 |  |  |   install_tag: 'devel',
 | 
					
						
							| 
									
										
										
										
											2021-10-07 17:03:28 +01:00
										 |  |  |   install: gdb_install,
 | 
					
						
							| 
									
										
										
										
											2016-12-06 08:07:03 -05:00
										 |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-25 16:50:18 -05:00
										 |  |  | # This is needed to make gdb find gobject_gdb.py
 | 
					
						
							| 
									
										
										
										
											2022-05-05 19:24:30 +01:00
										 |  |  | env = environment()
 | 
					
						
							|  |  |  | env.prepend('PYTHONPATH', meson.current_source_dir())
 | 
					
						
							|  |  |  | meson.add_devenv(env)
 | 
					
						
							| 
									
										
										
										
											2022-02-25 16:50:18 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-25 17:02:51 +00:00
										 |  |  | if enable_systemtap
 | 
					
						
							|  |  |  |   gobject_stp = configure_file(input : 'gobject.stp.in',
 | 
					
						
							|  |  |  |     output : '@0@.stp'.format(libgobject.full_path().split('/').get(-1)),
 | 
					
						
							|  |  |  |     configuration : stp_cdata,
 | 
					
						
							|  |  |  |     install_dir : tapset_install_dir,
 | 
					
						
							| 
									
										
										
										
											2022-09-20 11:29:27 -04:00
										 |  |  |     install_tag : 'systemtap',
 | 
					
						
							| 
									
										
										
										
											2019-06-17 16:52:36 +01:00
										 |  |  |   )
 | 
					
						
							| 
									
										
										
										
											2017-01-25 17:02:51 +00:00
										 |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 10:19:41 +00:00
										 |  |  | if build_tests
 | 
					
						
							|  |  |  |   subdir('tests')
 | 
					
						
							| 
									
										
										
										
											2019-06-17 16:52:36 +01:00
										 |  |  | endif
 |