summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>2020-11-24 17:16:39 +0900
committerDamian Hobson-Garcia <dhobsong@igel.co.jp>2021-02-19 10:48:23 +0000
commitf991de200799118355fd75237a740321bda7aaa7 (patch)
tree589f536d835d81f1166410e67aedb578d6e70395 /meson.build
parent464ec461237b36e03c4cdb175e9d87ab502ee1d5 (diff)
Add initial version
The initial version implements the basic functionality of the client/server communication and lease management. For now, one lease is created per valid connector (dependent on CRTC availablity). Bug-AGL: SPEC-3729 Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Change-Id: I2b37a892742cc22bdc53a5172c8ad3d8a7bb5e66
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build61
1 files changed, 61 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..2f6cd15
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,61 @@
+project(
+ 'lease_manager', 'c',
+ # Version based on Semantic Versioning 2.0.0 (https://semver.org/)
+ version: '0.1.0',
+ default_options: [
+ 'warning_level=2',
+ ]
+)
+
+config = configuration_data()
+
+pkg = import('pkgconfig')
+
+compiler_flags = [
+ '-Wstrict-prototypes',
+ '-Wmissing-prototypes',
+]
+
+#Setup and create runtime path
+runtime_path = join_paths(get_option('localstatedir'), get_option('runtime_subdir'))
+config.set_quoted('DLM_DEFAULT_RUNTIME_PATH', runtime_path)
+
+meson.add_install_script('sh', '-c', 'install -d $DESTDIR/$1', '_', runtime_path)
+
+cc = meson.get_compiler('c')
+add_project_arguments(
+ cc.get_supported_arguments(compiler_flags),
+ language: 'c'
+)
+
+configure_file(output: 'config.h',
+ configuration: config)
+
+configuration_inc = include_directories('.')
+
+drm_dep = dependency('libdrm', version: '>= 2.4.89')
+
+enable_tests = get_option('enable-tests')
+
+if enable_tests
+ check_dep = dependency('check')
+ thread_dep = dependency('threads')
+
+# Default to the system provided version of fff.h.
+# otherwise fetch it ourselves.
+ if cc.check_header('fff.h')
+ fff_dep = declare_dependency()
+ else
+ if meson.version().version_compare('>=0.55')
+ fff_proj = subproject('fff')
+ fff_dep = fff_proj.get_variable('fff_dep')
+ else
+ error('Update meson version to >=0.55 to enable unit testing')
+ endif
+ endif
+endif
+
+subdir('common')
+subdir('libdlmclient')
+subdir('drm-lease-manager')
+subdir('examples')