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