mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
meson: Use files() for gio sources and headers
This allows them to be fetched with subproject().get_variable(). Needed for generating Gio-2.0.gir in the gobject-introspection meson port.
This commit is contained in:
parent
1969af3e8c
commit
bd22bb9898
@ -121,7 +121,7 @@ gnetworking_h = configure_file(input : 'gnetworking.h.in',
|
|||||||
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
|
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
|
||||||
configuration : gnetworking_h_conf)
|
configuration : gnetworking_h_conf)
|
||||||
|
|
||||||
gdbus_headers = files([
|
gdbus_headers = files(
|
||||||
'gdbusauthobserver.h',
|
'gdbusauthobserver.h',
|
||||||
'gcredentials.h',
|
'gcredentials.h',
|
||||||
'gdbusutils.h',
|
'gdbusutils.h',
|
||||||
@ -144,9 +144,9 @@ gdbus_headers = files([
|
|||||||
'gdbusobjectmanagerclient.h',
|
'gdbusobjectmanagerclient.h',
|
||||||
'gdbusobjectmanagerserver.h',
|
'gdbusobjectmanagerserver.h',
|
||||||
'gtestdbus.h',
|
'gtestdbus.h',
|
||||||
])
|
)
|
||||||
|
|
||||||
gdbus_sources = [
|
gdbus_sources = files(
|
||||||
'gdbusutils.c',
|
'gdbusutils.c',
|
||||||
'gdbusaddress.c',
|
'gdbusaddress.c',
|
||||||
'gdbusauthobserver.c',
|
'gdbusauthobserver.c',
|
||||||
@ -174,7 +174,7 @@ gdbus_sources = [
|
|||||||
'gdbusobjectmanagerclient.c',
|
'gdbusobjectmanagerclient.c',
|
||||||
'gdbusobjectmanagerserver.c',
|
'gdbusobjectmanagerserver.c',
|
||||||
'gtestdbus.c',
|
'gtestdbus.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
# Generate gdbus-codegen
|
# Generate gdbus-codegen
|
||||||
subdir('gdbus-2.0/codegen')
|
subdir('gdbus-2.0/codegen')
|
||||||
@ -213,13 +213,13 @@ gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
|
|||||||
'--generate-c-code', 'gdbus-daemon-generated',
|
'--generate-c-code', 'gdbus-daemon-generated',
|
||||||
'--c-namespace', '_G', '@INPUT@'])
|
'--c-namespace', '_G', '@INPUT@'])
|
||||||
|
|
||||||
settings_headers = files([
|
settings_headers = files(
|
||||||
'gsettingsbackend.h',
|
'gsettingsbackend.h',
|
||||||
'gsettingsschema.h',
|
'gsettingsschema.h',
|
||||||
'gsettings.h',
|
'gsettings.h',
|
||||||
])
|
)
|
||||||
|
|
||||||
settings_sources = [
|
settings_sources = files(
|
||||||
'gvdb/gvdb-reader.c',
|
'gvdb/gvdb-reader.c',
|
||||||
'gdelayedsettingsbackend.c',
|
'gdelayedsettingsbackend.c',
|
||||||
'gkeyfilesettingsbackend.c',
|
'gkeyfilesettingsbackend.c',
|
||||||
@ -229,7 +229,7 @@ settings_sources = [
|
|||||||
'gsettingsschema.c',
|
'gsettingsschema.c',
|
||||||
'gsettings-mapping.c',
|
'gsettings-mapping.c',
|
||||||
'gsettings.c',
|
'gsettings.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
if host_system == 'windows'
|
if host_system == 'windows'
|
||||||
settings_sources += [ 'gregistrysettingsbackend.c' ]
|
settings_sources += [ 'gregistrysettingsbackend.c' ]
|
||||||
@ -240,7 +240,7 @@ endif
|
|||||||
#settings_sources += [ 'gnextstepsettingsbackend.c' ]
|
#settings_sources += [ 'gnextstepsettingsbackend.c' ]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
application_headers = files([
|
application_headers = files(
|
||||||
'gapplication.h',
|
'gapplication.h',
|
||||||
'gapplicationcommandline.h',
|
'gapplicationcommandline.h',
|
||||||
|
|
||||||
@ -259,9 +259,9 @@ application_headers = files([
|
|||||||
'gmenuexporter.h',
|
'gmenuexporter.h',
|
||||||
'gdbusmenumodel.h',
|
'gdbusmenumodel.h',
|
||||||
'gnotification.h',
|
'gnotification.h',
|
||||||
])
|
)
|
||||||
|
|
||||||
application_sources = [
|
application_sources = files(
|
||||||
'gapplication.c',
|
'gapplication.c',
|
||||||
'gapplicationcommandline.c',
|
'gapplicationcommandline.c',
|
||||||
'gapplicationimpl-dbus.c',
|
'gapplicationimpl-dbus.c',
|
||||||
@ -282,9 +282,9 @@ application_sources = [
|
|||||||
'gdbusmenumodel.c',
|
'gdbusmenumodel.c',
|
||||||
'gnotification.c',
|
'gnotification.c',
|
||||||
'gnotificationbackend.c',
|
'gnotificationbackend.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
local_sources = [
|
local_sources = files(
|
||||||
'ghttpproxy.c',
|
'ghttpproxy.c',
|
||||||
'glocalfile.c',
|
'glocalfile.c',
|
||||||
'glocalfileenumerator.c',
|
'glocalfileenumerator.c',
|
||||||
@ -298,7 +298,7 @@ local_sources = [
|
|||||||
'gsocks4aproxy.c',
|
'gsocks4aproxy.c',
|
||||||
'gsocks5proxy.c',
|
'gsocks5proxy.c',
|
||||||
'thumbnail-verify.c',
|
'thumbnail-verify.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
platform_deps = []
|
platform_deps = []
|
||||||
internal_deps = []
|
internal_deps = []
|
||||||
@ -308,7 +308,7 @@ portal_sources = []
|
|||||||
unix_sources = []
|
unix_sources = []
|
||||||
|
|
||||||
if host_system != 'windows'
|
if host_system != 'windows'
|
||||||
unix_sources = [
|
unix_sources = files(
|
||||||
'gfiledescriptorbased.c',
|
'gfiledescriptorbased.c',
|
||||||
'gunixconnection.c',
|
'gunixconnection.c',
|
||||||
'gunixcredentialsmessage.c',
|
'gunixcredentialsmessage.c',
|
||||||
@ -323,19 +323,19 @@ if host_system != 'windows'
|
|||||||
'gunixoutputstream.c',
|
'gunixoutputstream.c',
|
||||||
'gfdonotificationbackend.c',
|
'gfdonotificationbackend.c',
|
||||||
'ggtknotificationbackend.c',
|
'ggtknotificationbackend.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
portal_sources = [
|
portal_sources = [files(
|
||||||
'gdocumentportal.c',
|
'gdocumentportal.c',
|
||||||
'gopenuriportal.c',
|
'gopenuriportal.c',
|
||||||
'gnetworkmonitorportal.c',
|
'gnetworkmonitorportal.c',
|
||||||
'gproxyresolverportal.c',
|
'gproxyresolverportal.c',
|
||||||
'gportalsupport.c',
|
'gportalsupport.c',
|
||||||
'gportalnotificationbackend.c',
|
'gportalnotificationbackend.c'),
|
||||||
xdp_dbus_generated
|
xdp_dbus_generated
|
||||||
]
|
]
|
||||||
|
|
||||||
gio_unix_include_headers = [
|
gio_unix_include_headers = files(
|
||||||
'gfiledescriptorbased.h',
|
'gfiledescriptorbased.h',
|
||||||
'gunixconnection.h',
|
'gunixconnection.h',
|
||||||
'gunixcredentialsmessage.h',
|
'gunixcredentialsmessage.h',
|
||||||
@ -345,18 +345,18 @@ if host_system != 'windows'
|
|||||||
'gunixinputstream.h',
|
'gunixinputstream.h',
|
||||||
'gunixoutputstream.h',
|
'gunixoutputstream.h',
|
||||||
'gunixsocketaddress.h',
|
'gunixsocketaddress.h',
|
||||||
]
|
)
|
||||||
|
|
||||||
if glib_have_cocoa
|
if glib_have_cocoa
|
||||||
contenttype_sources += ['gosxcontenttype.c']
|
contenttype_sources += files('gosxcontenttype.c')
|
||||||
appinfo_sources += ['gosxappinfo.c']
|
appinfo_sources += files('gosxappinfo.c')
|
||||||
if glib_have_os_x_9_or_later
|
if glib_have_os_x_9_or_later
|
||||||
unix_sources += ['gcocoanotificationbackend.c']
|
unix_sources += files('gcocoanotificationbackend.c')
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
contenttype_sources += ['gcontenttype.c']
|
contenttype_sources += files('gcontenttype.c')
|
||||||
appinfo_sources += ['gdesktopappinfo.c']
|
appinfo_sources += files('gdesktopappinfo.c')
|
||||||
gio_unix_include_headers += ['gdesktopappinfo.h']
|
gio_unix_include_headers += files('gdesktopappinfo.h')
|
||||||
subdir('xdgmime')
|
subdir('xdgmime')
|
||||||
internal_deps += [xdgmime_lib]
|
internal_deps += [xdgmime_lib]
|
||||||
endif
|
endif
|
||||||
@ -364,10 +364,10 @@ if host_system != 'windows'
|
|||||||
install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
|
install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
|
||||||
|
|
||||||
if glib_conf.has('HAVE_NETLINK')
|
if glib_conf.has('HAVE_NETLINK')
|
||||||
unix_sources += [
|
unix_sources += files(
|
||||||
'gnetworkmonitornetlink.c',
|
'gnetworkmonitornetlink.c',
|
||||||
'gnetworkmonitornm.c',
|
'gnetworkmonitornm.c',
|
||||||
]
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -379,28 +379,28 @@ gdbus_daemon_sources = [
|
|||||||
|
|
||||||
win32_sources = gdbus_daemon_sources
|
win32_sources = gdbus_daemon_sources
|
||||||
if host_system == 'windows'
|
if host_system == 'windows'
|
||||||
appinfo_sources += ['gwin32appinfo.c']
|
appinfo_sources += files('gwin32appinfo.c')
|
||||||
contenttype_sources += ['gcontenttype-win32.c']
|
contenttype_sources += files('gcontenttype-win32.c')
|
||||||
platform_deps += [cc.find_library('shlwapi'),
|
platform_deps += [cc.find_library('shlwapi'),
|
||||||
cc.find_library('dnsapi'),
|
cc.find_library('dnsapi'),
|
||||||
iphlpapi_dep,
|
iphlpapi_dep,
|
||||||
winsock2]
|
winsock2]
|
||||||
win32_sources += [
|
win32_sources += files(
|
||||||
'gwin32registrykey.c',
|
'gwin32registrykey.c',
|
||||||
'gwin32mount.c',
|
'gwin32mount.c',
|
||||||
'gwin32volumemonitor.c',
|
'gwin32volumemonitor.c',
|
||||||
'gwin32inputstream.c',
|
'gwin32inputstream.c',
|
||||||
'gwin32outputstream.c',
|
'gwin32outputstream.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
gio_win32_include_headers = [
|
gio_win32_include_headers = files(
|
||||||
'gwin32inputstream.h',
|
'gwin32inputstream.h',
|
||||||
'gwin32outputstream.h',
|
'gwin32outputstream.h',
|
||||||
]
|
)
|
||||||
install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio')
|
install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gio_sources = [
|
gio_sources = files(
|
||||||
'gappinfo.c',
|
'gappinfo.c',
|
||||||
'gasynchelper.c',
|
'gasynchelper.c',
|
||||||
'gasyncinitable.c',
|
'gasyncinitable.c',
|
||||||
@ -517,7 +517,7 @@ gio_sources = [
|
|||||||
'gzlibdecompressor.c',
|
'gzlibdecompressor.c',
|
||||||
'glistmodel.c',
|
'glistmodel.c',
|
||||||
'gliststore.c',
|
'gliststore.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
gio_sources += appinfo_sources
|
gio_sources += appinfo_sources
|
||||||
gio_sources += contenttype_sources
|
gio_sources += contenttype_sources
|
||||||
@ -549,7 +549,7 @@ gio-2.0.lib: libgio-2.0.la gio.def
|
|||||||
'$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
|
'$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
|
||||||
'''
|
'''
|
||||||
|
|
||||||
gio_headers = files([
|
gio_headers = files(
|
||||||
'gappinfo.h',
|
'gappinfo.h',
|
||||||
'gasyncinitable.h',
|
'gasyncinitable.h',
|
||||||
'gasyncresult.h',
|
'gasyncresult.h',
|
||||||
@ -655,7 +655,7 @@ gio_headers = files([
|
|||||||
'gzlibdecompressor.h',
|
'gzlibdecompressor.h',
|
||||||
'glistmodel.h',
|
'glistmodel.h',
|
||||||
'gliststore.h',
|
'gliststore.h',
|
||||||
])
|
)
|
||||||
|
|
||||||
gio_headers += application_headers
|
gio_headers += application_headers
|
||||||
gio_headers += settings_headers
|
gio_headers += settings_headers
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
xdgmime_sources = [
|
xdgmime_sources = files(
|
||||||
'xdgmime.c',
|
'xdgmime.c',
|
||||||
'xdgmimealias.c',
|
'xdgmimealias.c',
|
||||||
'xdgmimecache.c',
|
'xdgmimecache.c',
|
||||||
@ -7,7 +7,7 @@ xdgmime_sources = [
|
|||||||
'xdgmimeint.c',
|
'xdgmimeint.c',
|
||||||
'xdgmimemagic.c',
|
'xdgmimemagic.c',
|
||||||
'xdgmimeparent.c',
|
'xdgmimeparent.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
xdgmime_lib = static_library('xdgmime',
|
xdgmime_lib = static_library('xdgmime',
|
||||||
sources : xdgmime_sources,
|
sources : xdgmime_sources,
|
||||||
|
@ -5,7 +5,6 @@ test_env = [
|
|||||||
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
|
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
|
||||||
'G_DEBUG=gc-friendly',
|
'G_DEBUG=gc-friendly',
|
||||||
'MALLOC_CHECK_=2',
|
'MALLOC_CHECK_=2',
|
||||||
'MALLOC_PERTURB_=@0@'.format(random_number % 256),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
test_cargs = ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"']
|
test_cargs = ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"']
|
||||||
|
Loading…
Reference in New Issue
Block a user