File: meson.build

package info (click to toggle)
phosh 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 9,620 kB
  • sloc: ansic: 81,727; xml: 3,903; python: 502; sh: 456; makefile: 34; lisp: 22; javascript: 6
file content (117 lines) | stat: -rw-r--r-- 3,076 bytes parent folder | download | duplicates (3)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
configure_file(input: 'run_tool.in', output: 'run_tool', configuration: run_data)

test(
  'check-exported-symbols',
  find_program('check-exported-symbols'),
  args: phosh,
  suite: 'tools',
)

test(
  'check-deprecated-ui-props',
  find_program('check-deprecated-ui-props'),
  args: meson.project_source_root(),
  suite: 'tools',
)

tools_or_tests = get_option('tools') or get_option('tests')

if tools_or_tests
  # app-buttons is used in the screenshot tests
  executable(
    'app-buttons',
    ['app-buttons.c'],
    dependencies: [phosh_tool_dep, test_stubs_dep],
  )
endif

if get_option('lockscreen-plugins') or get_option('quick-setting-plugins') or tools_or_tests
  # plugin-prefs is used in the tests
  executable(
    'plugin-prefs',
    ['plugin-prefs-standalone.c', '../src/plugin-loader.c'],
    c_args: [
      '-DBUILD_DIR="@0@"'.format(meson.project_build_root()),
      '-DLOCKSCREEN_PLUGINS="@0@"'.format(' '.join(lockscreen_plugins)),
      '-DQUICK_SETTING_PLUGINS="@0@"'.format(' '.join(quick_setting_plugins)),
      '-DTEST_INSTALLED="@0@/install"'.format(meson.project_build_root()),
    ],
    include_directories: [root_inc, phosh_inc],
    dependencies: [plugin_prefs_dep, gmodule_dep],
  )
endif

if get_option('tools')

  executable(
    'app-scroll',
    ['app-scroll.c'],
    dependencies: [phosh_tool_dep, test_stubs_dep],
  )

  executable(
    'app-grid-standalone',
    ['app-grid-standalone.c'],
    dependencies: [[phosh_tool_dep, phosh_search_dep], test_stubs_dep],
  )

  executable(
    'image-notify',
    ['image-notify.c'],
    dependencies: [phosh_tool_dep, test_stubs_dep],
  )

  executable('notify-blocks', ['notify-blocks.c'], dependencies: phosh_tool_dep)

  executable(
    'notify-server-standalone',
    ['notify-server-standalone.c'],
    dependencies: [phosh_tool_dep, test_stubs_dep],
  )

  executable(
    'dump-app-list',
    ['dump-app-list.c'],
    dependencies: [phosh_tool_dep, test_stubs_dep],
  )

  executable(
    'quick-settings-box-standalone',
    ['quick-settings-box-standalone.c'],
    dependencies: [phosh_tool_dep, test_stubs_dep],
  )

  if get_option('lockscreen-plugins')
    executable(
      'widget-box',
      ['widget-box-standalone.c'],
      c_args: [
        '-DBUILD_DIR="@0@"'.format(meson.project_build_root()),
        '-DPLUGINS="@0@"'.format(' '.join(lockscreen_plugins)),
      ],
      link_args: phosh_export_sym_link_arg,
      dependencies: [gmodule_dep, phosh_tool_dep, test_stubs_dep],
    )
  endif

  if get_option('quick-setting-plugins')
    executable(
      'custom-quick-settings',
      ['custom-quick-settings-standalone.c'],
      c_args: [
        '-DBUILD_DIR="@0@"'.format(meson.project_build_root()),
        '-DPLUGINS="@0@"'.format(' '.join(quick_setting_plugins)),
      ],
      link_args: phosh_export_sym_link_arg,
      link_with: [phosh_lib],
      dependencies: [gmodule_dep, phosh_tool_dep, test_stubs_dep],
    )
  endif

  executable(
    'search',
    ['search.c'],
    dependencies: [[phosh_tool_dep, phosh_search_dep], test_stubs_dep],
  )

endif