libliftoff/meson.build

74 lines
1.4 KiB
Meson
Raw Permalink Normal View History

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',
2023-02-20 22:09:40 +01:00
version: '0.5.0-dev',
2019-08-21 22:07:37 +02:00
license: 'MIT',
meson_version: '>=0.52.0',
2019-08-21 22:07:37 +02:00
default_options: [
'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([
'-Wundef',
'-Wmissing-prototypes',
'-Walloca',
'-Wdeclaration-after-statement',
'-Wfloat-conversion',
'-Wsign-conversion',
2019-08-21 22:07:37 +02:00
'-Wno-missing-braces',
'-Wno-unused-parameter',
]), language: 'c')
liftoff_inc = include_directories('include')
2019-08-21 22:07:37 +02:00
drm = dependency('libdrm', include_type: 'system', version: '>= 2.4.108')
2019-08-21 22:07:37 +02:00
liftoff_deps = [drm]
2019-08-21 22:07:37 +02:00
liftoff_lib = library(
2021-02-24 11:01:23 +01:00
'liftoff',
2019-08-21 22:07:37 +02:00
files(
'alloc.c',
'device.c',
2019-08-21 22:07:37 +02:00
'layer.c',
'list.c',
'log.c',
2019-08-21 22:07:37 +02:00
'output.c',
'plane.c',
2019-08-21 22:07:37 +02:00
),
include_directories: liftoff_inc,
version: meson.project_version().split('-')[0],
dependencies: liftoff_deps,
2019-08-21 22:07:37 +02:00
install: true,
)
liftoff = declare_dependency(
link_with: liftoff_lib,
include_directories: liftoff_inc,
dependencies: liftoff_deps,
2019-08-21 22:07:37 +02:00
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('libliftoff', liftoff)
endif
install_headers('include/libliftoff.h')
2019-08-21 22:07:37 +02:00
pkgconfig = import('pkgconfig')
pkgconfig.generate(
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-16 22:41:19 +02:00
subdir('example')
subdir('test')