Skip to content

Commit

Permalink
Optionally install wayland session files
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkyBluefang committed Jul 6, 2024
1 parent cafdf9a commit 92bcc5a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
13 changes: 7 additions & 6 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ desktop_conf.set('bindir', join_paths(prefix, bindir))
desktop_conf.set('libexecdir', join_paths(prefix, libexecdir))
desktop_conf.set('VERSION', meson.project_version())

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

foreach desktop_file : desktop_files
desktop = configure_file(
Expand All @@ -40,7 +39,9 @@ foreach desktop_file : desktop_files
endforeach

subdir('xdg-portal')
subdir('wayland_sessions')
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
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ option('py3modules_dir',
value : '',
description: 'Where to install python3 modules'
)
option('wayland',
type : 'boolean',
value : true,
description: 'Enable wayland support'
)

0 comments on commit 92bcc5a

Please sign in to comment.