2023-02-02 10:58:07 +00:00
|
|
|
hwdata = dependency(
|
|
|
|
'hwdata',
|
|
|
|
required: 'drm' in backends,
|
|
|
|
native: true,
|
|
|
|
not_found_message: 'Required for the DRM backend.',
|
|
|
|
)
|
2022-11-23 15:04:43 +00:00
|
|
|
|
2023-02-02 11:14:11 +00:00
|
|
|
libdisplay_info = dependency(
|
|
|
|
'libdisplay-info',
|
|
|
|
required: 'drm' in backends,
|
|
|
|
fallback: 'libdisplay-info',
|
|
|
|
not_found_message: 'Required for the DRM backend.',
|
|
|
|
)
|
|
|
|
|
2022-08-18 17:17:33 +00:00
|
|
|
libliftoff = dependency(
|
|
|
|
'libliftoff',
|
2023-02-06 17:40:44 +00:00
|
|
|
version: '>=0.4.0',
|
2022-08-18 17:17:33 +00:00
|
|
|
fallback: 'libliftoff',
|
2024-06-06 04:33:05 +00:00
|
|
|
required: get_option('libliftoff'),
|
2022-08-18 17:17:33 +00:00
|
|
|
)
|
|
|
|
|
2023-02-02 11:14:11 +00:00
|
|
|
if not (hwdata.found() and libdisplay_info.found() and features['session'])
|
2023-02-02 10:58:07 +00:00
|
|
|
subdir_done()
|
2022-06-26 21:11:47 +00:00
|
|
|
endif
|
|
|
|
|
2023-02-02 10:58:07 +00:00
|
|
|
hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir')
|
2022-06-26 21:11:47 +00:00
|
|
|
pnpids_c = custom_target(
|
|
|
|
'pnpids.c',
|
|
|
|
output: 'pnpids.c',
|
2023-02-02 10:58:07 +00:00
|
|
|
input: files(hwdata_dir / 'pnp.ids'),
|
2022-06-26 21:11:47 +00:00
|
|
|
feed: true,
|
|
|
|
capture: true,
|
|
|
|
command: files('gen_pnpids.sh'),
|
|
|
|
)
|
|
|
|
wlr_files += pnpids_c
|
|
|
|
|
2019-11-22 07:11:15 +00:00
|
|
|
wlr_files += files(
|
|
|
|
'atomic.c',
|
|
|
|
'backend.c',
|
|
|
|
'drm.c',
|
2023-11-23 14:55:24 +00:00
|
|
|
'fb.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'legacy.c',
|
2021-12-10 20:14:57 +00:00
|
|
|
'monitor.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'properties.c',
|
|
|
|
'renderer.c',
|
|
|
|
'util.c',
|
|
|
|
)
|
2021-03-26 15:28:37 +00:00
|
|
|
|
2022-08-18 17:17:33 +00:00
|
|
|
if libliftoff.found()
|
|
|
|
wlr_files += files('libliftoff.c')
|
2024-05-27 22:30:33 +00:00
|
|
|
internal_config.set10('HAVE_LIBLIFTOFF_0_5', libliftoff.version().version_compare('>=0.5.0'))
|
2022-08-18 17:17:33 +00:00
|
|
|
endif
|
|
|
|
|
2021-03-26 15:28:37 +00:00
|
|
|
features += { 'drm-backend': true }
|
2022-08-18 17:17:33 +00:00
|
|
|
internal_features += { 'libliftoff': libliftoff.found() }
|
2023-02-02 11:14:11 +00:00
|
|
|
wlr_deps += libdisplay_info
|
2022-08-18 17:17:33 +00:00
|
|
|
wlr_deps += libliftoff
|