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
Currently, going to https://mesonbuild.com/Vala.html suggests this is a valid way to generate GIR and GI typelibs:
foo_lib = shared_library('foo', 'foo.vala', vala_gir: 'Foo-1.0.gir', dependencies: [glib_dep, gobject_dep], install: true, install_dir: [true, true, true, true]) g_ir_compiler = find_program('g-ir-compiler') custom_target('foo typelib', command: [g_ir_compiler, '--output', '@OUTPUT@', '@INPUT@'], input: meson.current_build_dir() / 'Foo-1.0.gir', output: 'Foo-1.0.typelib', depends: foo_lib, install: true, install_dir: get_option('libdir') / 'girepository-1.0')
However this fails with meson 0.51.2 complaining it can't find the input for the second target. To make this work you need to do the following:
foo_lib = shared_library('foo', 'foo.vala', vala_gir: 'Foo-1.0.gir', dependencies: [glib_dep, gobject_dep], install: true, install_dir: [true, true, true, true]) g_ir_compiler = find_program('g-ir-compiler') custom_target('foo typelib', command: [g_ir_compiler, '--output', '@OUTPUT@', meson.current_build_dir() / 'Foo-1.0.gir',], output: 'Foo-1.0.typelib', depends: foo_lib, install: true, install_dir: get_option('libdir') / 'girepository-1.0')
There used to be a test case that covered this, but it seems to have gone awol.
The text was updated successfully, but these errors were encountered:
I agree. Also, if your are using this as a subproject you should export the meson.current_build_dir() and use it when creating a new library, also used as a subproject of other program.
meson.current_build_dir()
Sorry, something went wrong.
No branches or pull requests
Currently, going to https://mesonbuild.com/Vala.html suggests this is a valid way to generate GIR and GI typelibs:
However this fails with meson 0.51.2 complaining it can't find the input for the second target. To make this work you need to do the following:
There used to be a test case that covered this, but it seems to have gone awol.
The text was updated successfully, but these errors were encountered: