summaryrefslogtreecommitdiff
path: root/src/meson.build
blob: d8eb7968b1326e76a3f44f8e85b07a05448d3970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
srcs = files(
    'pam.c',
)

deps = [
    dependency('gobject-2.0'),
    dependency('gio-2.0'),
    dependency('pam')
]

astal_auth_lib = library(
    'astal-auth',
    sources : srcs,
    include_directories : astal_auth_inc,
    dependencies : deps,
    version : meson.project_version(),
    install : true
)

libastal_auth = declare_dependency(
    link_with : astal_auth_lib,
    include_directories : astal_auth_inc)

astal_auth_executable = executable(
    'astal-auth',
    files('astal-auth.c'),
    dependencies : [
        dependency('gobject-2.0'),
        libastal_auth
    ],
    install : true)

pkg_config_name = 'astal-auth-' + lib_so_version

if get_option('introspection')
    gir = gnome.generate_gir(
        astal_auth_lib,
        sources : srcs + astal_auth_headers,
        nsversion : '0.1',
        namespace : 'AstalAuth',
        symbol_prefix : 'astal_auth',
        identifier_prefix : 'AstalAuth',
        includes : ['GObject-2.0', 'Gio-2.0'],
        header : 'astal/auth.h',
        export_packages : pkg_config_name,
        install : true
    )

    if get_option('vapi')
        gnome.generate_vapi(
            pkg_config_name,
            sources : [gir[0]],
            packages : ['gobject-2.0', 'gio-2.0'],
            install : true)
    endif
endif

pkg_config.generate(
    name : 'astal-auth',
    version : meson.project_version(),
    libraries : [astal_auth_lib],
    filebase : pkg_config_name,
    subdirs : 'astal',
    description : 'astal authentication module',
    url : 'https://github.com/astal-sh/auth')