Skip to content

Commit

Permalink
Make the example compositor build a non default build option
Browse files Browse the repository at this point in the history
  • Loading branch information
fossfreedom committed Jul 10, 2023
1 parent fe8f47b commit 5680273
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 16 deletions.
6 changes: 5 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ have_x11 = true
have_xwayland = have_wayland # for now default to have_wayland
have_x11_client = have_x11 or have_xwayland

example_wm = get_option('with_example_wm')

if have_xwayland and not have_wayland
error('XWayland support requires Wayland support enabled')
endif
Expand Down Expand Up @@ -642,7 +644,9 @@ subdir('tools')
subdir('src')
subdir('po')

subdir('doc/man')
if example_wm
subdir('doc/man')
endif
if have_documentation
subdir('doc/reference')
endif
Expand Down
6 changes: 6 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,9 @@ option('with_shared_components',
value: false,
description: 'Build components that are shared with Mutter'
)

option('with_example_wm',
type: 'boolean',
value: false,
description: 'Build example window manager'
)
33 changes: 18 additions & 15 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1096,20 +1096,21 @@ libmutter_dep = declare_dependency(
],
)

mutter = executable('magpie',
sources: [
files('core/mutter.c'),
],
include_directories: mutter_includes,
c_args: [
mutter_c_args,
'-DG_LOG_DOMAIN="magpie"',
],
dependencies: [libmutter_dep],
install_dir: bindir,
install: true,
)
if have_x11
if example_wm
mutter = executable('magpie',
sources: [
files('core/mutter.c'),
],
include_directories: mutter_includes,
c_args: [
mutter_c_args,
'-DG_LOG_DOMAIN="magpie"',
],
dependencies: [libmutter_dep],
install_dir: bindir,
install: true,
)

executable('magpie-restart-helper',
sources: [
files('core/restart-helper.c'),
Expand Down Expand Up @@ -1184,7 +1185,9 @@ pkg.generate(libmutter,
install_dir: pcdir,
)

subdir('compositor/plugins')
if example_wm
subdir('compositor/plugins')
endif

if have_core_tests
subdir('tests')
Expand Down

0 comments on commit 5680273

Please sign in to comment.