summaryrefslogtreecommitdiff
path: root/src/modules/meson.build
blob: 1b60cd0aba0f587febea1338edeffb9e762f90be (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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
module_files     = []
module_ldflags   = '-module -avoid-version'
module_includes  = [ '../../..', '../../bin', '../../bin/efx' ]
module_includes2 = [ '../..'   , '../bin'   , '../bin/efx'  ]
module_deps      = [ deps_e, dep_dl ]

mods = [
# standard run of the mill modules with cion and desktop
  'ibar',
  'pager',
  'temperature',
  'mixer',
  'notification',
  'everything',
  'ibox',
  'start',
  'winlist',
  'fileman',
  'fileman_opinfo',
  'conf',
  'msgbus',
  'music-control',
  'conf_applications',
  'conf_shelves',
  'conf_window_remembers',
  'conf_window_manipulation',
  'conf_menus',
  'conf_dialogs',
  'conf_performance',
  'conf_paths',
  'conf_interaction',
  'gadman',
  'geolocation',
  'connman',
  'bluez5',
  'syscon',
  'systray',
  'appmenu',
  'quickaccess',
  'shot',
  'backlight',
  'tasks',
  'conf_randr',
  'xkbswitch',
  'tiling',
  'packagekit',
  'vkbd',
  'procstats',
# modules have a custom binary as well
  'battery',
  'cpufreq',
  'clock',
# custyom sub modules and custom data
  'wizard',
# also standard modules, just with only a desktop file using a generic icon
  'conf_theme',
  'conf_intl',
  'conf_display',
  'conf_bindings',
# also standard modules with no icon or desktop file
  'xwayland',
  'lokker',
  'polkit',
  'wl_x11',
  'wl_wl',
  'wl_buffer',
  'wl_drm',
  'wl_text_input',
  'wl_desktop_shell',
  'wl_weekeyboard',
### XXX: disabled for now
#  'wl_fb'
]

foreach m: mods
  disable      = false
  no_icon      = false
  cargs        = ''
  data         = []
  deps         = deps_e
  inc          = []
  _dir         = join_paths(dir_module_e, m)
  _dir_bin     = join_paths(_dir, module_arch)

  opt = '-'.join(m.split('_'))

  if get_option(opt) == true
    subdir(m)
  else
    disable = true
  endif

  if disable == false

    _inc2 = []
    foreach i: inc
      _inc2 +=  join_paths('.', m, i)
    endforeach
    _inc          = include_directories(module_includes2,
                                        join_paths('.', m),
                                        _inc2)
    _conf         = 'USE_MODULE_' + m.underscorify().to_upper()
    module_files += join_paths(_dir_bin, m + '.so')

    if no_icon == true
      _data = []
    else
      _data = [ join_paths(m, 'e-module-' + m + '.edj'),
                join_paths(m, 'module.desktop') ]
    endif

    foreach d: data
      _data += join_paths(m, d)
    endforeach

    if _data.length() > 0
      install_data(_data,
                   install_dir: _dir)
    endif

    config_h.set(_conf, '1')
    if cargs == ''
      shared_module(m, src,
                    include_directories: _inc,
                    name_prefix        : '',
                    dependencies       : [ module_deps, deps ],
                    install_dir        : _dir_bin,
                    install            : true,
                    link_args          : '-Wl,--unresolved-symbols=ignore-all'
                   )
    else
      shared_module(m, src,
                    include_directories: _inc,
                    c_args             : cargs,
                    name_prefix        : '',
                    dependencies       : [ module_deps, deps ],
                    install_dir        : _dir_bin,
                    install            : true,
                    link_args          : '-Wl,--unresolved-symbols=ignore-all'
                   )
    endif
  endif
endforeach