2017-10-23 10:53:04 +02:00
|
|
|
subdir('cmph')
|
|
|
|
|
2019-04-30 10:07:39 +02:00
|
|
|
custom_c_args = []
|
|
|
|
|
|
|
|
if cc.get_id() != 'msvc'
|
|
|
|
custom_c_args = cc.get_supported_arguments([
|
|
|
|
'-Wno-old-style-definition',
|
|
|
|
'-Wno-cast-align',
|
|
|
|
])
|
|
|
|
endif
|
|
|
|
|
2017-10-23 10:53:04 +02:00
|
|
|
girepo_gthash_lib = static_library('girepository-gthash',
|
|
|
|
sources: 'gthash.c',
|
2017-11-23 09:15:37 +01:00
|
|
|
include_directories : configinc,
|
2018-12-15 12:18:04 +01:00
|
|
|
c_args: gi_hidden_visibility_cflags + custom_c_args,
|
2017-10-23 10:53:04 +02:00
|
|
|
dependencies: [
|
|
|
|
cmph_dep,
|
2017-11-23 09:15:37 +01:00
|
|
|
glib_dep,
|
|
|
|
gmodule_dep,
|
2020-04-23 03:15:45 +02:00
|
|
|
gobject_dep,
|
2017-10-23 10:53:04 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
girepo_gthash_dep = declare_dependency(
|
|
|
|
link_with: girepo_gthash_lib,
|
2020-04-23 03:15:45 +02:00
|
|
|
dependencies: [glib_dep, gmodule_dep, gobject_dep],
|
2017-10-23 10:53:04 +02:00
|
|
|
include_directories: include_directories('.'),
|
|
|
|
)
|
|
|
|
|
2019-04-30 10:07:39 +02:00
|
|
|
if cc.get_id() != 'msvc'
|
|
|
|
custom_c_args = cc.get_supported_arguments([
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-duplicated-branches',
|
|
|
|
'-Wno-cast-align',
|
|
|
|
])
|
|
|
|
endif
|
|
|
|
|
2017-10-23 10:53:04 +02:00
|
|
|
girepo_internals_lib = static_library('girepository-internals',
|
|
|
|
sources: [
|
|
|
|
'girmodule.c',
|
|
|
|
'girnode.c',
|
|
|
|
'giroffsets.c',
|
|
|
|
'girparser.c',
|
|
|
|
'girwriter.c',
|
|
|
|
],
|
2018-12-15 12:18:04 +01:00
|
|
|
c_args: gi_hidden_visibility_cflags + custom_c_args,
|
2017-11-23 09:15:37 +01:00
|
|
|
include_directories : configinc,
|
2017-10-23 10:53:04 +02:00
|
|
|
dependencies: [girepo_gthash_dep, libffi_dep],
|
|
|
|
)
|
|
|
|
|
|
|
|
girepo_internals_dep = declare_dependency(
|
|
|
|
link_with: girepo_internals_lib,
|
|
|
|
dependencies: libffi_dep,
|
|
|
|
include_directories: include_directories('.'),
|
|
|
|
)
|
|
|
|
|
2018-12-14 11:21:29 +01:00
|
|
|
gi_version_h = configure_file(
|
|
|
|
configuration: config,
|
|
|
|
input: 'giversion.h.in',
|
|
|
|
output: 'giversion.h',
|
|
|
|
)
|
|
|
|
|
2017-10-23 10:53:04 +02:00
|
|
|
girepo_headers = [
|
|
|
|
'giarginfo.h',
|
|
|
|
'gibaseinfo.h',
|
|
|
|
'gicallableinfo.h',
|
|
|
|
'giconstantinfo.h',
|
|
|
|
'gienuminfo.h',
|
|
|
|
'gifieldinfo.h',
|
|
|
|
'gifunctioninfo.h',
|
|
|
|
'giinterfaceinfo.h',
|
|
|
|
'giobjectinfo.h',
|
|
|
|
'gipropertyinfo.h',
|
|
|
|
'giregisteredtypeinfo.h',
|
|
|
|
'girepository.h',
|
|
|
|
'girffi.h',
|
|
|
|
'gisignalinfo.h',
|
|
|
|
'gistructinfo.h',
|
|
|
|
'gitypeinfo.h',
|
|
|
|
'gitypelib.h',
|
|
|
|
'gitypes.h',
|
|
|
|
'giunioninfo.h',
|
|
|
|
'giversionmacros.h',
|
|
|
|
'givfuncinfo.h',
|
2018-12-14 11:21:29 +01:00
|
|
|
gi_version_h,
|
2017-10-23 10:53:04 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
girepo_sources = [
|
|
|
|
'gdump.c',
|
|
|
|
'giarginfo.c',
|
|
|
|
'gibaseinfo.c',
|
|
|
|
'gicallableinfo.c',
|
|
|
|
'giconstantinfo.c',
|
|
|
|
'gienuminfo.c',
|
|
|
|
'gifieldinfo.c',
|
|
|
|
'gifunctioninfo.c',
|
|
|
|
'ginvoke.c',
|
|
|
|
'giinterfaceinfo.c',
|
|
|
|
'giobjectinfo.c',
|
|
|
|
'gipropertyinfo.c',
|
|
|
|
'giregisteredtypeinfo.c',
|
|
|
|
'girepository.c',
|
|
|
|
'girffi.c',
|
|
|
|
'gisignalinfo.c',
|
|
|
|
'gistructinfo.c',
|
|
|
|
'gitypeinfo.c',
|
|
|
|
'gitypelib.c',
|
|
|
|
'giunioninfo.c',
|
2018-12-14 11:21:29 +01:00
|
|
|
'giversion.c',
|
2017-10-23 10:53:04 +02:00
|
|
|
'givfuncinfo.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
# Used in gir/meson.build
|
|
|
|
girepo_gir_sources = files(
|
|
|
|
'giarginfo.c',
|
|
|
|
'gibaseinfo.c',
|
|
|
|
'gicallableinfo.c',
|
|
|
|
'giconstantinfo.c',
|
|
|
|
'gienuminfo.c',
|
|
|
|
'gifieldinfo.c',
|
|
|
|
'gifunctioninfo.c',
|
|
|
|
'giinterfaceinfo.c',
|
|
|
|
'giobjectinfo.c',
|
|
|
|
'gipropertyinfo.c',
|
|
|
|
'giregisteredtypeinfo.c',
|
|
|
|
'girepository.c',
|
|
|
|
'gisignalinfo.c',
|
|
|
|
'gistructinfo.c',
|
|
|
|
'gitypeinfo.c',
|
|
|
|
'giunioninfo.c',
|
2018-12-14 11:21:29 +01:00
|
|
|
'giversion.c',
|
2017-10-23 10:53:04 +02:00
|
|
|
'givfuncinfo.c',
|
|
|
|
'giarginfo.h',
|
|
|
|
'gibaseinfo.h',
|
|
|
|
'gicallableinfo.h',
|
|
|
|
'giconstantinfo.h',
|
|
|
|
'gienuminfo.h',
|
|
|
|
'gifieldinfo.h',
|
|
|
|
'gifunctioninfo.h',
|
|
|
|
'giinterfaceinfo.h',
|
|
|
|
'giobjectinfo.h',
|
|
|
|
'gipropertyinfo.h',
|
|
|
|
'giregisteredtypeinfo.h',
|
|
|
|
'girepository.h',
|
|
|
|
'gisignalinfo.h',
|
|
|
|
'gistructinfo.h',
|
|
|
|
'gitypeinfo.h',
|
|
|
|
'gitypelib.h',
|
|
|
|
'gitypes.h',
|
|
|
|
'giunioninfo.h',
|
|
|
|
'givfuncinfo.h',
|
2018-12-14 11:21:29 +01:00
|
|
|
) + [gi_version_h]
|
|
|
|
|
2017-10-23 10:53:04 +02:00
|
|
|
|
|
|
|
install_headers(girepo_headers, subdir: 'gobject-introspection-1.0')
|
|
|
|
|
2019-04-30 10:07:39 +02:00
|
|
|
if cc.get_id() != 'msvc'
|
|
|
|
custom_c_args = cc.get_supported_arguments([
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-duplicated-branches',
|
|
|
|
'-Wno-type-limits',
|
|
|
|
'-Wno-cast-align',
|
|
|
|
'-Wno-missing-field-initializers',
|
|
|
|
])
|
|
|
|
endif
|
|
|
|
|
2019-09-10 13:49:04 +02:00
|
|
|
lib_version = '1.0.0'
|
|
|
|
lib_version_arr = lib_version.split('.')
|
|
|
|
lib_version_major = lib_version_arr[0].to_int()
|
|
|
|
lib_version_minor = lib_version_arr[1].to_int()
|
|
|
|
lib_version_micro = lib_version_arr[2].to_int()
|
|
|
|
|
|
|
|
osx_current = lib_version_major + 1
|
|
|
|
lib_osx_version = [osx_current, '@0@.@1@'.format(osx_current, lib_version_minor)]
|
|
|
|
|
2017-10-23 10:53:04 +02:00
|
|
|
girepo_lib = shared_library('girepository-1.0',
|
|
|
|
sources: girepo_sources,
|
2017-11-23 09:15:37 +01:00
|
|
|
include_directories : configinc,
|
2018-12-15 12:18:04 +01:00
|
|
|
c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'] +
|
|
|
|
custom_c_args,
|
2017-11-23 09:15:37 +01:00
|
|
|
dependencies: [glib_dep, gobject_dep, gmodule_dep,
|
|
|
|
gio_dep, girepo_internals_dep],
|
2019-09-10 13:49:04 +02:00
|
|
|
version: lib_version,
|
|
|
|
darwin_versions: lib_osx_version,
|
2017-10-23 10:53:04 +02:00
|
|
|
install: true,
|
|
|
|
)
|
|
|
|
|
2017-11-23 21:59:01 +01:00
|
|
|
# Copy to builddir for use with giscanner/dumper.py when running uninstalled
|
|
|
|
configure_file(input : 'gdump.c',
|
|
|
|
output : 'gdump.c',
|
2018-12-18 13:32:53 +01:00
|
|
|
copy: true,
|
2017-11-23 21:59:01 +01:00
|
|
|
install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'),
|
2017-10-23 10:53:04 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
girepo_dep = declare_dependency(
|
|
|
|
link_with: girepo_lib,
|
2017-11-23 09:15:37 +01:00
|
|
|
dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
|
2017-10-23 10:53:04 +02:00
|
|
|
include_directories: include_directories('.'),
|
|
|
|
)
|
|
|
|
|
|
|
|
gthash_test = executable('gthash-test', 'gthash-test.c',
|
|
|
|
dependencies: girepo_gthash_dep,
|
|
|
|
)
|
|
|
|
|
|
|
|
test('gthash-test', gthash_test)
|
|
|
|
|
|
|
|
if giounix_dep.found()
|
|
|
|
executable('gi-dump-types', 'gi-dump-types.c',
|
2017-11-23 09:15:37 +01:00
|
|
|
dependencies: [girepo_dep, giounix_dep])
|
2017-10-23 10:53:04 +02:00
|
|
|
endif
|