3 # Version based on Semantic Versioning 2.0.0 (https://semver.org/)
10 config = configuration_data()
12 pkg = import('pkgconfig')
15 '-Wstrict-prototypes',
16 '-Wmissing-prototypes',
19 #Setup and create runtime path
20 runtime_path = join_paths(get_option('localstatedir'), get_option('runtime_subdir'))
21 config.set_quoted('DLM_DEFAULT_RUNTIME_PATH', runtime_path)
23 meson.add_install_script('sh', '-c', 'install -d $DESTDIR/$1', '_', runtime_path)
25 cc = meson.get_compiler('c')
26 add_project_arguments(
27 cc.get_supported_arguments(compiler_flags),
31 drm_dep = dependency('libdrm', version: '>= 2.4.89')
32 thread_dep = dependency('threads')
33 toml_dep = dependency('libtoml')
35 systemd_dep = dependency('', required: false)
36 if get_option('enable-systemd')
37 systemd_dep = dependency('libsystemd', required: false)
39 config.set('HAVE_SYSTEMD_DAEMON', '1')
42 enable_tests = get_option('enable-tests')
45 check_dep = dependency('check')
47 # Default to the system provided version of fff.h.
48 # otherwise fetch it ourselves.
49 if cc.check_header('fff.h')
50 fff_dep = declare_dependency()
52 if meson.version().version_compare('>=0.55')
53 fff_proj = subproject('fff')
54 fff_dep = fff_proj.get_variable('fff_dep')
56 error('Update meson version to >=0.55 to enable unit testing')
61 configure_file(output: 'config.h',
62 configuration: config)
64 configuration_inc = include_directories('.')
67 subdir('libdlmclient')
68 subdir('drm-lease-manager')