Debian Codegraph @

src/polkitbackend/meson.build

raw
1 name = '@0@-backend-@1@'.format(meson.project_name(), pk_api_version)
2
3 sources = files(
4 'polkitbackendactionlookup.c',
5 'polkitbackendactionpool.c',
6 'polkitbackendauthority.c',
7 'polkitbackendcommon.c',
8 'polkitbackendinteractiveauthority.c',
9 )
10
11 output = 'initjs.h'
12
13 sources += custom_target(
14 output,
15 input: 'init.js',
16 output: output,
17 capture: true,
18 command: [find_program('perl'), meson.current_source_dir() / 'toarray.pl', '@INPUT@', 'init_js'],
19 )
20
21 deps = [
22 expat_dep,
23 libpolkit_gobject_dep,
24 js_dep,
25 ]
26
27 c_flags = [
28 '-D_POLKIT_COMPILATION',
29 '-D_POLKIT_BACKEND_COMPILATION',
30 '-DPACKAGE_DATA_DIR="@0@"'.format(pk_prefix / pk_datadir),
31 '-DPACKAGE_SYSCONF_DIR="@0@"'.format(pk_prefix / pk_sysconfdir),
32 ]
33
34 sources += files('polkitbackendduktapeauthority.c')
35 deps += libm_dep
36 deps += thread_dep
37
38 if enable_logind
39 sources += files('polkitbackendsessionmonitor-systemd.c')
40 deps += logind_dep
41 else
42 sources += files('polkitbackendsessionmonitor.c')
43 endif
44
45 libpolkit_backend = static_library(
46 name,
47 sources: sources,
48 include_directories: top_inc,
49 dependencies: deps,
50 c_args: c_flags,
51 cpp_args: c_flags,
52 )
53
54 configure_file(
55 input: '50-default.rules.in',
56 output: '@BASENAME@',
57 configuration: {
58 'PRIVILEGED_GROUP': privileged_group,
59 },
60 install: true,
61 install_dir: pk_pkgdatadir / 'rules.d',
62 )
63
64 program = 'polkitd'
65
66 c_flags = [
67 '-DG_LOG_DOMAIN="@0@-@1@"'.format(program, pk_api_version),
68 '-DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE',
69 ]
70
71 executable(
72 program,
73 program + '.c',
74 include_directories: top_inc,
75 dependencies: deps,
76 c_args: c_flags,
77 link_with: libpolkit_backend,
78 install: true,
79 install_dir: pk_libprivdir,
80 )