blob: fe06a3547c8b1abd4725276bbd90e47c060d3570 [file] [log] [blame]
Andrew Jeffery9c766792022-08-10 23:12:49 +09301project('libpldm', ['c','cpp'],
2 default_options: [
3 'buildtype=debugoptimized',
4 'warning_level=3',
5 'werror=true',
6 'cpp_std=c++20',
7 'c_std=c17',
8 'tests=' + (meson.is_subproject() ? 'disabled' : 'enabled'),
9 ],
10 version: '0.1.0',
11 meson_version: '>=0.63.0',
12)
13
14add_project_arguments('-D_DEFAULT_SOURCE',language:['c'])
15
16libpldm_sources = files()
17subdir('src')
18
19libpldm_include_dir = ['include']
20libpldm_headers = files()
21
22subdir('include/libpldm')
23
24libpldm = library(
25 'pldm',
26 libpldm_sources,
27 implicit_include_directories: false,
28 include_directories: libpldm_include_dir,
29 version: meson.project_version(),
30 install: true
31 )
32
33install_headers(
34 libpldm_headers,
35 subdir:'libpldm'
36 )
37
38libpldm_dep = declare_dependency(
39 include_directories: libpldm_include_dir,
40 link_with: libpldm)
41
42import('pkgconfig').generate(
43 name: 'libpldm',
44 description: 'PLDM protocol encode/decode C lib',
45 version: meson.project_version(),
46 libraries: libpldm)
47
48if get_option('tests').enabled()
49 subdir('tests')
50endif