mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 18:40:58 +01:00
meson: Use glib_dep and configinc for girepository
glib_dep is what is actually needed to #include <glib.h>, not gobject_dep. It works incidentally with system gobject/glib but not when built via subprojects.
This commit is contained in:
parent
4c8c1a53b8
commit
3a78885133
@ -25,7 +25,7 @@ cmph_sources = [
|
||||
]
|
||||
|
||||
cmph_deps = [
|
||||
gobject_dep,
|
||||
glib_dep,
|
||||
cc.find_library('m', required: false),
|
||||
]
|
||||
|
||||
@ -43,7 +43,7 @@ cmph_dep = declare_dependency(
|
||||
cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c',
|
||||
dependencies: [
|
||||
cmph_dep,
|
||||
gobject_dep,
|
||||
glib_dep,
|
||||
]
|
||||
)
|
||||
|
||||
|
25
meson.build
25
meson.build
@ -2,16 +2,18 @@ subdir('cmph')
|
||||
|
||||
girepo_gthash_lib = static_library('girepository-gthash',
|
||||
sources: 'gthash.c',
|
||||
include_directories : configinc,
|
||||
c_args: gi_hidden_visibility_cflags,
|
||||
dependencies: [
|
||||
cmph_dep,
|
||||
gobject_dep,
|
||||
glib_dep,
|
||||
gmodule_dep,
|
||||
],
|
||||
)
|
||||
|
||||
girepo_gthash_dep = declare_dependency(
|
||||
link_with: girepo_gthash_lib,
|
||||
dependencies: gobject_dep,
|
||||
dependencies: [glib_dep, gmodule_dep],
|
||||
include_directories: include_directories('.'),
|
||||
)
|
||||
|
||||
@ -24,6 +26,7 @@ girepo_internals_lib = static_library('girepository-internals',
|
||||
'girwriter.c',
|
||||
],
|
||||
c_args: gi_hidden_visibility_cflags,
|
||||
include_directories : configinc,
|
||||
dependencies: [girepo_gthash_dep, libffi_dep],
|
||||
)
|
||||
|
||||
@ -125,13 +128,10 @@ install_headers(girepo_headers, subdir: 'gobject-introspection-1.0')
|
||||
|
||||
girepo_lib = shared_library('girepository-1.0',
|
||||
sources: girepo_sources,
|
||||
include_directories : configinc,
|
||||
c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'],
|
||||
dependencies: [
|
||||
gio_dep,
|
||||
gmodule_dep,
|
||||
girepo_internals_dep,
|
||||
dependency('gio-2.0'),
|
||||
],
|
||||
dependencies: [glib_dep, gobject_dep, gmodule_dep,
|
||||
gio_dep, girepo_internals_dep],
|
||||
version: '1.0.0',
|
||||
install: true,
|
||||
)
|
||||
@ -142,7 +142,7 @@ install_data('gdump.c',
|
||||
|
||||
girepo_dep = declare_dependency(
|
||||
link_with: girepo_lib,
|
||||
dependencies: gio_dep,
|
||||
dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
|
||||
include_directories: include_directories('.'),
|
||||
)
|
||||
|
||||
@ -154,10 +154,5 @@ test('gthash-test', gthash_test)
|
||||
|
||||
if giounix_dep.found()
|
||||
executable('gi-dump-types', 'gi-dump-types.c',
|
||||
dependencies: [
|
||||
girepo_dep,
|
||||
gmodule_dep,
|
||||
giounix_dep,
|
||||
]
|
||||
)
|
||||
dependencies: [girepo_dep, giounix_dep])
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user