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',
|
2021-08-09 11:29:05 +02:00
|
|
|
version: '0.2.0',
|
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: [
|
|
|
|
'c_std=c99',
|
|
|
|
'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
|
|
|
|
2020-10-20 23:19:55 +02:00
|
|
|
drm = dependency('libdrm', include_type: 'system')
|
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,
|
2019-08-21 22:07:37 +02:00
|
|
|
version: meson.project_version(),
|
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
|
|
|
)
|
|
|
|
|
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
|
|
|
version: meson.project_version(),
|
|
|
|
filebase: meson.project_name(),
|
|
|
|
name: meson.project_name(),
|
2021-07-01 14:34:53 +02:00
|
|
|
description: 'KMS plane library',
|
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')
|