Skip to content

Commit 24d047d

Browse files
danirabbitstsdc
andauthored
Indicator: self contain meson (#430)
* Indicator: self contain meson * add indicator to CI * Use non-hacky paths * Move wingpanel dependency to Indicator's meson file; update build command in readme --------- Co-authored-by: Stanisław <[email protected]>
1 parent 086aad3 commit 24d047d

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ sudo apt install build-essential cmake sassc valac libgtk-3-dev libgee-0.8-dev l
5858

5959
2. To build with the wingpanel indicator:
6060
```bash
61-
meson builddir --prefix=/usr -Dindicator-wingpanel=enabled
61+
meson setup -Dindicator-wingpanel=enabled build
6262
```
6363
Alternatively, to build without the wingpanel indicator:
6464
```bash
65-
meson builddir --prefix=/usr
65+
meson setup build
6666
```
6767

6868
3. Install:

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ subdir('src')
7171
meson.add_install_script('meson/post_install.py')
7272

7373
subdir('po')
74-
# subdir('tests')
74+
# subdir('tests')

src/Indicator/meson.build

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
source_indicator_files = [
2+
'Indicator.vala',
3+
'Services/DBusClient.vala',
4+
'Widgets/DisplayWidget.vala',
5+
'Widgets/IndicatorWidget.vala',
6+
'Widgets/PopoverWidget.vala',
7+
8+
meson.project_source_root() / 'src' / 'Resources/ResourcesSerialized.vala',
9+
meson.project_source_root() / 'src' / 'Utils.vala',
10+
]
11+
12+
wingpanel_dep = dependency('wingpanel', version: '>=2.1.0')
13+
14+
indicator_dependencies = [
15+
wingpanel_dep
16+
]
17+
18+
shared_module(
19+
'monitor',
20+
source_indicator_files,
21+
icons_gresource,
22+
dependencies: indicator_dependencies,
23+
install: true,
24+
install_dir : wingpanel_dep.get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', libdir]),
25+
)

src/meson.build

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,6 @@ source_app_files = [
8585

8686
]
8787

88-
source_indicator_files = [
89-
'Indicator/Indicator.vala',
90-
'Utils.vala',
91-
'Resources/ResourcesSerialized.vala',
92-
93-
'Indicator/Widgets/DisplayWidget.vala',
94-
'Indicator/Widgets/PopoverWidget.vala',
95-
'Indicator/Widgets/IndicatorWidget.vala',
96-
97-
'Indicator/Services/DBusClient.vala',
98-
]
99-
10088
executable(
10189
meson.project_name(),
10290
icons_gresource,
@@ -108,15 +96,6 @@ executable(
10896
)
10997

11098
if get_option('indicator-wingpanel').enabled()
111-
message ('Indicator Wingpanel will be built')
112-
wingpanel_dep = dependency('wingpanel', version: '>=2.1.0')
113-
app_dependencies += [wingpanel_dep]
114-
shared_module(
115-
'monitor',
116-
source_indicator_files,
117-
icons_gresource,
118-
dependencies: app_dependencies,
119-
install: true,
120-
install_dir : wingpanel_dep.get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', libdir]),
121-
)
99+
message ('Indicator Wingpanel will be built')
100+
subdir('Indicator')
122101
endif

0 commit comments

Comments
 (0)