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',
|
|
|
|
meson_version: '>=0.47.0',
|
|
|
|
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
|
|
|
|
|
|
|
drm = dependency('libdrm')
|
|
|
|
|
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(
|
|
|
|
'display.c',
|
|
|
|
'layer.c',
|
|
|
|
'list.c',
|
|
|
|
'output.c',
|
|
|
|
),
|
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
|
|
|
)
|
|
|
|
|
|
|
|
executable(
|
|
|
|
'example',
|
|
|
|
files('example.c'),
|
2019-09-12 10:39:06 +02:00
|
|
|
dependencies: [liftoff],
|
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
|
|
|
|
|
|
|
subdir('test')
|