libliftoff/meson.build
Simon Ser 5afeeb531a
Add test framework
When testing the library, the libdrm dependency is swapped with a mock libdrm.
The test sets up the mock libdrm's internal state and then runs the test.
2019-09-13 10:33:49 +03:00

62 lines
1.1 KiB
Meson

project(
'liftoff',
'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')
liftoff_inc = include_directories('include')
drm = dependency('libdrm')
liftoff_deps = [drm]
liftoff_lib = library(
meson.project_name(),
files(
'display.c',
'layer.c',
'list.c',
'output.c',
),
include_directories: liftoff_inc,
version: meson.project_version(),
dependencies: liftoff_deps,
install: true,
)
liftoff = declare_dependency(
link_with: liftoff_lib,
include_directories: liftoff_inc,
dependencies: liftoff_deps,
)
executable(
'example',
files('example.c'),
dependencies: [liftoff],
)
pkgconfig = import('pkgconfig')
pkgconfig.generate(
libraries: liftoff_lib,
version: meson.project_version(),
filebase: meson.project_name(),
name: meson.project_name(),
description: 'Hardware composer library',
)
subdir('test')