wlroots-hyprland/backend/session/meson.build
Scott Anderson cff1c2f740 meson: Various improvements
Bumps minimum version to 0.51.0

- Remove all intermediate static libraries.
  They serve no purpose and are just add a bunch of boilerplate for
  managing dependencies and options. It's now managed as a list of
  files which are compiled into libwlroots directly.

- Use install_subdir instead of installing headers individually.
  I've changed my mind since I did that. Listing them out is annoying as
  hell, and it's easy to forget to do it.

- Add not_found_message for all of our optional dependencies that have a
  meson option. It gives some hints about what option to pass and what
  the optional dependency is for.

- Move all backend subdirectories into their own meson.build. This
keeps some of the backend-specific build logic (especially rdp and
session) more neatly separated off.

- Don't overlink example clients with code they're not using.
  This was done by merging the protocol dictionaries and setting some
  variables containing the code and client header file.
  Example clients now explicitly mention what extension protocols they
  want to link to.

- Split compositor example logic from client example logic.

- Minor formatting changes
2019-12-23 07:48:29 -05:00

53 lines
1.3 KiB
Meson

wlr_files += files(
'direct-ipc.c',
'noop.c',
'session.c',
)
if host_machine.system().startswith('freebsd')
wlr_files += files('direct-freebsd.c')
else
wlr_files += files('direct.c')
endif
# logind
msg = []
if get_option('logind').enabled()
msg += 'Install "lib@0@" or pass "-Dlogind=disabled".'
endif
if not get_option('logind').disabled()
msg += 'Required for logind support.'
msg += 'You may need to pass "-Dlogind-provider=elogind" or "-Dlogind-provider=systemd" to ensure the correct library is detected.'
endif
logind = dependency('lib' + get_option('logind-provider'),
required: get_option('logind'),
not_found_message: '\n'.join(msg).format(get_option('logind-provider')),
version: '>=237',
)
if logind.found()
wlr_files += files('logind.c')
wlr_deps += logind
conf_data.set10('WLR_HAS_' + get_option('logind-provider').to_upper(), true)
endif
# libcap
msg = []
if get_option('libcap').enabled()
msg += 'Install "libcap" or pass "-Dlibcap=disabled".'
endif
if not get_option('libcap').disabled()
msg += 'Required for POSIX capability support (Not needed if using logind).'
endif
libcap = dependency('libcap',
required: get_option('libcap'),
not_found_message: '\n'.join(msg),
)
if libcap.found()
conf_data.set10('WLR_HAS_LIBCAP', true)
wlr_deps += libcap
endif