2019-08-21 22:07:37 +02:00
|
|
|
project(
|
2019-09-12 10:39:06 +02:00
|
|
|
'liftoff',
|
2019-08-21 22:07:37 +02:00
|
|
|
'c',
|
|
|
|
version: '0.0.0',
|
|
|
|
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([
|
|
|
|
'-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(
|
2019-08-21 22:07:37 +02:00
|
|
|
meson.project_name(),
|
|
|
|
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(
|
2019-09-12 10:39:06 +02:00
|
|
|
libraries: liftoff_lib,
|
2019-08-21 22:07:37 +02:00
|
|
|
version: meson.project_version(),
|
|
|
|
filebase: meson.project_name(),
|
|
|
|
name: meson.project_name(),
|
|
|
|
description: 'Hardware composer library',
|
|
|
|
)
|
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')
|