-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
granite should use native meson gir support #645
Comments
gnome.generate_gir is only for C, here we are using vala so we are only getting a .gir from valac so we need to use g-ir-compiler manually |
Weird, any idea why vala is not supported there? Even stranger is that the gnome module has vala support for stuff like |
Because |
Hmm, maybe there should be a variant for the It appears the |
Can you try with ecca06c |
Haven't tested but from a quick review that's probably going to cause issues, when cross compiling we have to override the default |
Something like this seems to work: diff --git a/lib/meson.build b/lib/meson.build
index 1716cf7e..a937928b 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -106,6 +106,14 @@ install_data(
if get_option('introspection')
# typelib generation isn't automated yet
g_ir_compiler = find_program('g-ir-compiler')
+ sysroot = meson.get_external_property('sys_root', '/')
+ gi_dep = dependency('gobject-introspection-1.0')
+ prefix = gi_dep.get_variable(pkgconfig: 'prefix')
+ if prefix[0] == '/'
+ prefix = prefix.substring(1)
+ endif
+ prefix = join_paths(sysroot, prefix)
+ girdir = gi_dep.get_variable(pkgconfig: 'girdir', pkgconfig_define: ['prefix', prefix])
custom_target(
granite_typelib,
command: [
@@ -115,6 +123,8 @@ if get_option('introspection')
'--output',
'@OUTPUT@',
join_paths(meson.current_build_dir(), granite_gir),
+ '--includedir',
+ girdir,
],
input: libgranite,
output: granite_typelib, |
What Happened?
There is a build failure due to granite using a custom
g-ir-compiler
target rather than the native meson gir support. See discussion here.Steps to Reproduce
granite is not using meson's native gir support
Expected Behavior
granite should use meson's native gir support for improved cross compilation compatibility
OS Version
Other Linux
Software Version
Latest release (I have run all updates)
Log Output
The text was updated successfully, but these errors were encountered: