Skip to content

Commit

Permalink
Optionally install wayland and xdg-portal files
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkyBluefang committed Jul 3, 2024
1 parent 62d50ef commit ca76309
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
13 changes: 10 additions & 3 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ desktop_conf.set('VERSION', meson.project_version())

desktop_files = [
'cinnamon.desktop',
'cinnamon-wayland.desktop',
'cinnamon2d.desktop',
]

if get_option('wayland')
desktop_files += ['cinnamon-wayland.desktop']
endif

foreach desktop_file : desktop_files
desktop = configure_file(
input: desktop_file + '.in.in',
Expand All @@ -39,8 +42,12 @@ foreach desktop_file : desktop_files
)
endforeach

subdir('xdg-portal')
subdir('wayland_sessions')
if get_option('xdg-portal')
subdir('xdg-portal')
endif
if get_option('wayland')
subdir('wayland_sessions')
endif
subdir('xsessions')
subdir('services')

Expand Down
11 changes: 8 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,15 @@ else
session_conf.set('REQUIRED', '')
endif

foreach file : ['cinnamon.session', 'cinnamon2d.session', 'cinnamon-wayland.session']
session_files = ['cinnamon.session', 'cinnamon2d.session']
if get_option('wayland')
session_files += ['cinnamon-wayland.session']
endif

foreach session_file : session_files
configure_file(
input: file + '.in',
output: file,
input: session_file + '.in',
output: session_file,
configuration: session_conf,
install_dir: join_paths(prefix, datadir, 'cinnamon-session', 'sessions'),
)
Expand Down
10 changes: 10 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,14 @@ option('py3modules_dir',
value : '',
description: 'Where to install python3 modules'
)
option('wayland',
type : 'boolean',
value : true,
description: 'Enable wayland support'
)
option('xdg-portal',
type : 'boolean',
value : true,
description: 'Enable xdg-portal support'
)

0 comments on commit ca76309

Please sign in to comment.