2019-08-21 22:07:37 +02:00
|
|
|
project(
|
2021-02-24 11:01:23 +01:00
|
|
|
'libliftoff',
|
2019-08-21 22:07:37 +02:00
|
|
|
'c',
|
2022-08-18 09:18:44 +02:00
|
|
|
version: '0.4.0-dev',
|
2019-08-21 22:07:37 +02:00
|
|
|
license: 'MIT',
|
2020-10-20 23:19:55 +02:00
|
|
|
meson_version: '>=0.52.0',
|
2019-08-21 22:07:37 +02:00
|
|
|
default_options: [
|
2022-07-26 10:25:49 +02:00
|
|
|
'c_std=c11',
|
2019-08-21 22:07:37 +02:00
|
|
|
'warning_level=3',
|
|
|
|
'werror=true',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
|
|
|
add_project_arguments(cc.get_supported_arguments([
|
2021-08-13 15:39:04 +02:00
|
|
|
'-Wundef',
|
|
|
|
'-Wmissing-prototypes',
|
|
|
|
'-Walloca',
|
|
|
|
|
2019-08-21 22:07:37 +02:00
|
|
|
'-Wno-missing-braces',
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
]), language: 'c')
|
|
|
|
|
2019-09-12 10:39:06 +02:00
|
|
|
liftoff_inc = include_directories('include')
|
2019-08-21 22:07:37 +02:00
|
|
|
|
2023-02-15 14:06:01 +01:00
|
|
|
drm = dependency('libdrm', include_type: 'system', version: '>= 2.4.108')
|
2019-08-21 22:07:37 +02:00
|
|
|
|
2019-09-12 10:39:06 +02:00
|
|
|
liftoff_deps = [drm]
|
2019-08-21 22:07:37 +02:00
|
|
|
|
2019-09-12 10:39:06 +02:00
|
|
|
liftoff_lib = library(
|
2021-02-24 11:01:23 +01:00
|
|
|
'liftoff',
|
2019-08-21 22:07:37 +02:00
|
|
|
files(
|
2019-10-19 12:43:09 +02:00
|
|
|
'alloc.c',
|
2019-11-29 01:51:22 +01:00
|
|
|
'device.c',
|
2019-08-21 22:07:37 +02:00
|
|
|
'layer.c',
|
|
|
|
'list.c',
|
2019-10-07 08:47:53 +02:00
|
|
|
'log.c',
|
2019-08-21 22:07:37 +02:00
|
|
|
'output.c',
|
2019-10-11 16:09:35 +02:00
|
|
|
'plane.c',
|
2019-08-21 22:07:37 +02:00
|
|
|
),
|
2019-09-12 10:39:06 +02:00
|
|
|
include_directories: liftoff_inc,
|
2022-05-24 12:23:01 +02:00
|
|
|
version: meson.project_version().split('-')[0],
|
2019-09-12 10:39:06 +02:00
|
|
|
dependencies: liftoff_deps,
|
2019-08-21 22:07:37 +02:00
|
|
|
install: true,
|
|
|
|
)
|
|
|
|
|
2019-09-12 10:39:06 +02:00
|
|
|
liftoff = declare_dependency(
|
|
|
|
link_with: liftoff_lib,
|
|
|
|
include_directories: liftoff_inc,
|
|
|
|
dependencies: liftoff_deps,
|
2019-08-21 22:07:37 +02:00
|
|
|
)
|
|
|
|
|
2023-02-06 11:18:16 +01:00
|
|
|
if meson.version().version_compare('>= 0.54.0')
|
|
|
|
meson.override_dependency('libliftoff', liftoff)
|
|
|
|
endif
|
|
|
|
|
2020-01-27 11:04:52 +01:00
|
|
|
install_headers('include/libliftoff.h')
|
|
|
|
|
2019-08-21 22:07:37 +02:00
|
|
|
pkgconfig = import('pkgconfig')
|
|
|
|
pkgconfig.generate(
|
2021-02-24 10:59:23 +01:00
|
|
|
liftoff_lib,
|
2019-08-21 22:07:37 +02:00
|
|
|
filebase: meson.project_name(),
|
|
|
|
name: meson.project_name(),
|
2021-07-01 14:34:53 +02:00
|
|
|
description: 'KMS plane library',
|
2023-02-15 11:50:33 +01:00
|
|
|
url: 'https://gitlab.freedesktop.org/emersion/libliftoff',
|
2019-08-21 22:07:37 +02:00
|
|
|
)
|
2019-09-13 09:33:49 +02:00
|
|
|
|
2019-09-16 22:41:19 +02:00
|
|
|
subdir('example')
|
2019-09-13 09:33:49 +02:00
|
|
|
subdir('test')
|