mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-10 21:03:51 +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 = [
|
cmph_deps = [
|
||||||
gobject_dep,
|
glib_dep,
|
||||||
cc.find_library('m', required: false),
|
cc.find_library('m', required: false),
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ cmph_dep = declare_dependency(
|
|||||||
cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c',
|
cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c',
|
||||||
dependencies: [
|
dependencies: [
|
||||||
cmph_dep,
|
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',
|
girepo_gthash_lib = static_library('girepository-gthash',
|
||||||
sources: 'gthash.c',
|
sources: 'gthash.c',
|
||||||
|
include_directories : configinc,
|
||||||
c_args: gi_hidden_visibility_cflags,
|
c_args: gi_hidden_visibility_cflags,
|
||||||
dependencies: [
|
dependencies: [
|
||||||
cmph_dep,
|
cmph_dep,
|
||||||
gobject_dep,
|
glib_dep,
|
||||||
|
gmodule_dep,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
girepo_gthash_dep = declare_dependency(
|
girepo_gthash_dep = declare_dependency(
|
||||||
link_with: girepo_gthash_lib,
|
link_with: girepo_gthash_lib,
|
||||||
dependencies: gobject_dep,
|
dependencies: [glib_dep, gmodule_dep],
|
||||||
include_directories: include_directories('.'),
|
include_directories: include_directories('.'),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -24,6 +26,7 @@ girepo_internals_lib = static_library('girepository-internals',
|
|||||||
'girwriter.c',
|
'girwriter.c',
|
||||||
],
|
],
|
||||||
c_args: gi_hidden_visibility_cflags,
|
c_args: gi_hidden_visibility_cflags,
|
||||||
|
include_directories : configinc,
|
||||||
dependencies: [girepo_gthash_dep, libffi_dep],
|
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',
|
girepo_lib = shared_library('girepository-1.0',
|
||||||
sources: girepo_sources,
|
sources: girepo_sources,
|
||||||
|
include_directories : configinc,
|
||||||
c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'],
|
c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'],
|
||||||
dependencies: [
|
dependencies: [glib_dep, gobject_dep, gmodule_dep,
|
||||||
gio_dep,
|
gio_dep, girepo_internals_dep],
|
||||||
gmodule_dep,
|
|
||||||
girepo_internals_dep,
|
|
||||||
dependency('gio-2.0'),
|
|
||||||
],
|
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
@ -142,7 +142,7 @@ install_data('gdump.c',
|
|||||||
|
|
||||||
girepo_dep = declare_dependency(
|
girepo_dep = declare_dependency(
|
||||||
link_with: girepo_lib,
|
link_with: girepo_lib,
|
||||||
dependencies: gio_dep,
|
dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
|
||||||
include_directories: include_directories('.'),
|
include_directories: include_directories('.'),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -154,10 +154,5 @@ test('gthash-test', gthash_test)
|
|||||||
|
|
||||||
if giounix_dep.found()
|
if giounix_dep.found()
|
||||||
executable('gi-dump-types', 'gi-dump-types.c',
|
executable('gi-dump-types', 'gi-dump-types.c',
|
||||||
dependencies: [
|
dependencies: [girepo_dep, giounix_dep])
|
||||||
girepo_dep,
|
|
||||||
gmodule_dep,
|
|
||||||
giounix_dep,
|
|
||||||
]
|
|
||||||
)
|
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user