glib/gobject/meson.build
Christoph Reiter 631c3534b7 meson: use the new 'python' module instead of the 'python3' one. Closes #1455
The new python module, added with 0.46, works with Python 2 and 3 and
allows to pass a path for the interpreter to use, if the need arises.

Previously the meson build set PYTHON, used in the shebang line of
the scripts installed by glib, to the full path of the interpreter.
The new meson module doesn't expose that atm, but we should set it to
a executable name anyway, and not a full path.
2018-07-19 12:32:29 +02:00

133 lines
3.1 KiB
Meson

gobject_install_headers = files(
'gobject-autocleanups.h',
'glib-types.h',
'gbinding.h',
'gboxed.h',
'gclosure.h',
'genums.h',
'gmarshal.h',
'gobject.h',
'gparam.h',
'gparamspecs.h',
'gsignal.h',
'gsourceclosure.h',
'gtype.h',
'gtypemodule.h',
'gtypeplugin.h',
'gvalue.h',
'gvaluearray.h',
'gvaluecollector.h',
'gvaluetypes.h',
'gobjectnotifyqueue.c', # sic
)
install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject')
gobject_sources = files(
'gatomicarray.c',
'gbinding.c',
'gboxed.c',
'gclosure.c',
'genums.c',
'gmarshal.c',
'gobject.c',
'gparam.c',
'gparamspecs.c',
'gsignal.c',
'gsourceclosure.c',
'gtype.c',
'gtypemodule.c',
'gtypeplugin.c',
'gvalue.c',
'gvaluearray.c',
'gvaluetransform.c',
'gvaluetypes.c',
)
if host_system == 'windows'
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
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
libgobject = library('gobject-2.0',
gobject_dtrace_obj, gobject_dtrace_hdr,
sources : gobject_sources,
version : library_version,
soversion : soversion,
install : true,
include_directories : [configinc],
dependencies : [libffi_dep, libglib_dep],
c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args,
link_args : glib_link_flags,
)
pkg.generate(libraries : 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',
)
libgobject_dep = declare_dependency(link_with : libgobject,
include_directories : gobjectinc)
python_tools = [
'glib-genmarshal',
'glib-mkenums',
]
python_tools_conf = configuration_data()
python_tools_conf.set('VERSION', glib_version)
python_tools_conf.set('PYTHON', python_name)
foreach tool: python_tools
tool_bin = configure_file(
input : tool + '.in',
output : tool,
configuration : python_tools_conf,
install : true,
install_dir : glib_bindir,
)
# Set variables for later use
set_variable(tool.underscorify(), tool_bin)
endforeach
executable('gobject-query', 'gobject-query.c',
install : true,
dependencies : [libglib_dep, libgobject_dep])
install_data('gobject_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
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,
install_dir: gdb_install_dir,
)
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,
install : true)
endif
subdir('tests')