mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 12:23:06 +02:00
meson: Use files() for headers and sources
This allows them to be fetched via subproject().get_variable(). Needed for the gobject-introspection meson port.
This commit is contained in:
parent
c603ba301d
commit
2e5bb92de6
@ -13,24 +13,24 @@ else
|
||||
subdir('gnulib')
|
||||
endif
|
||||
|
||||
glib_headers = [
|
||||
glib_headers = files(
|
||||
'glib.h',
|
||||
'glib-unix.h',
|
||||
'glib-object.h',
|
||||
]
|
||||
)
|
||||
install_headers(glib_headers, subdir : 'glib-2.0')
|
||||
|
||||
glib_deprecated_headers = [
|
||||
glib_deprecated_headers = files(
|
||||
'deprecated/gallocator.h',
|
||||
'deprecated/gcache.h',
|
||||
'deprecated/gcompletion.h',
|
||||
'deprecated/gmain.h',
|
||||
'deprecated/grel.h',
|
||||
'deprecated/gthread.h',
|
||||
]
|
||||
)
|
||||
install_headers(glib_deprecated_headers, subdir : 'glib-2.0/glib/deprecated')
|
||||
|
||||
glib_sub_headers = [
|
||||
glib_sub_headers = files(
|
||||
'glib-autocleanups.h',
|
||||
'galloca.h',
|
||||
'garray.h',
|
||||
@ -105,18 +105,18 @@ glib_sub_headers = [
|
||||
'gversionmacros.h',
|
||||
'gwin32.h',
|
||||
'gprintf.h',
|
||||
]
|
||||
)
|
||||
install_headers(glib_sub_headers, subdir : 'glib-2.0/glib')
|
||||
|
||||
deprecated_sources = [
|
||||
deprecated_sources = files(
|
||||
'deprecated/gallocator.c',
|
||||
'deprecated/gcache.c',
|
||||
'deprecated/gcompletion.c',
|
||||
'deprecated/grel.c',
|
||||
'deprecated/gthread-deprecated.c'
|
||||
]
|
||||
)
|
||||
|
||||
glib_sources = [
|
||||
glib_sources = files(
|
||||
'garray.c',
|
||||
'gasyncqueue.c',
|
||||
'gatomic.c',
|
||||
@ -194,15 +194,15 @@ glib_sources = [
|
||||
'gversion.c',
|
||||
'gwakeup.c',
|
||||
'gprintf.c',
|
||||
]
|
||||
)
|
||||
|
||||
if host_system == 'windows'
|
||||
thread_src = ['gthread-win32.c']
|
||||
plat_src = ['gwin32.c', 'gspawn-win32.c', 'giowin32.c']
|
||||
glib_sources += files('gthread-win32.c')
|
||||
glib_sources += files('gwin32.c', 'gspawn-win32.c', 'giowin32.c')
|
||||
platform_deps = [winsock2, cc.find_library('winmm')]
|
||||
else
|
||||
thread_src = ['gthread-posix.c']
|
||||
plat_src = ['glib-unix.c', 'gspawn.c', 'giounix.c']
|
||||
glib_sources += files('gthread-posix.c')
|
||||
glib_sources += files('glib-unix.c', 'gspawn.c', 'giounix.c')
|
||||
platform_deps = []
|
||||
endif
|
||||
|
||||
@ -222,7 +222,7 @@ endif
|
||||
|
||||
libglib = shared_library('glib-2.0',
|
||||
glib_dtrace_obj, glib_dtrace_hdr,
|
||||
sources : [deprecated_sources, glib_sources, thread_src, plat_src],
|
||||
sources : [deprecated_sources, glib_sources],
|
||||
version : library_version,
|
||||
soversion : soversion,
|
||||
install : true,
|
||||
|
@ -1,4 +1,4 @@
|
||||
gobject_install_headers = files([
|
||||
gobject_install_headers = files(
|
||||
'gobject-autocleanups.h',
|
||||
'glib-types.h',
|
||||
'gbinding.h',
|
||||
@ -19,11 +19,10 @@ gobject_install_headers = files([
|
||||
'gvaluecollector.h',
|
||||
'gvaluetypes.h',
|
||||
'gobjectnotifyqueue.c', # sic
|
||||
])
|
||||
)
|
||||
install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject')
|
||||
|
||||
gobject_c_sources = [
|
||||
# 'gobject_probes.d',
|
||||
gobject_sources = files(
|
||||
'gatomicarray.c',
|
||||
'gbinding.c',
|
||||
'gboxed.c',
|
||||
@ -31,7 +30,6 @@ gobject_c_sources = [
|
||||
'genums.c',
|
||||
'gmarshal.c',
|
||||
'gobject.c',
|
||||
'gobject_trace.h',
|
||||
'gparam.c',
|
||||
'gparamspecs.c',
|
||||
'gsignal.c',
|
||||
@ -43,7 +41,7 @@ gobject_c_sources = [
|
||||
'gvaluearray.c',
|
||||
'gvaluetransform.c',
|
||||
'gvaluetypes.c',
|
||||
]
|
||||
)
|
||||
|
||||
if enable_dtrace
|
||||
gobject_dtrace_obj = dtrace_obj_gen.process('gobject_probes.d')
|
||||
@ -55,7 +53,7 @@ endif
|
||||
|
||||
libgobject = shared_library('gobject-2.0',
|
||||
gobject_dtrace_obj, gobject_dtrace_hdr,
|
||||
sources : [gobject_c_sources],
|
||||
sources : gobject_sources,
|
||||
version : library_version,
|
||||
soversion : soversion,
|
||||
install : true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user