diff --git a/data/meson.build b/data/meson.build index ca1b61117b..dba549d57c 100644 --- a/data/meson.build +++ b/data/meson.build @@ -23,11 +23,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( @@ -47,7 +46,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') diff --git a/meson.build b/meson.build index 818450ecbd..d2042f95cd 100644 --- a/meson.build +++ b/meson.build @@ -166,10 +166,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'), ) diff --git a/meson_options.txt b/meson_options.txt index 82422246b0..321192d8c6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -23,4 +23,9 @@ option('py3modules_dir', value : '', description: 'Where to install python3 modules' ) +option('wayland', + type : 'boolean', + value : true, + description: 'Enable wayland support' +)