Skip to content

Using a custom VAPI does not generate a -pkg foo flag #2103

Open
@wblaszcz

Description

@wblaszcz

The current 'Using a custom VAPI' (with pkg-config file) example on the wiki does not work for me.
I need to explicitly add a --pkg=foo to the executable line. I can only assume that this is a bug?
e.g.
change


add_project_arguments(['--vapidir', join_paths(meson.current_source_dir(), 'vapi')], 
                      language: 'vala')
                      
glib_dep = dependency('glib-2.0')
gobject_dep = dependency('gobject-2.0')
foo_dep = dependency('foo') # 'foo.vapi' will be resolved in './vapi/foo.vapi'

executable('app', 'app.vala', dependencies: [glib_dep, gobject_dep, foo_dep])

to


add_project_arguments(['--vapidir', join_paths(meson.current_source_dir(), 'vapi')], 
                      language: 'vala')
                      
glib_dep = dependency('glib-2.0')
gobject_dep = dependency('gobject-2.0')
foo_dep = dependency('foo') # 'foo.vapi' will be resolved in './vapi/foo.vapi'

executable('app', 'app.vala', dependencies: [glib_dep, gobject_dep, foo_dep], vala_args: ['--pkg=foo'])

BTW, on the 'Using a custom VAPI' (with no pkg-config file) example, the foo_vapi line is missing a closing parentheses.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions