xref: /openbmc/libpldm/include/libpldm/meson.build (revision c6837f00be70b3aac2c654d5e399f57a652452ae)
1libpldm_headers = files(
2    'api.h',
3    'base.h',
4    'bcd.h',
5    'bios.h',
6    'bios_table.h',
7    'compiler.h',
8    'control.h',
9    'edac.h',
10    'entity.h',
11    'file.h',
12    'firmware_fd.h',
13    'firmware_update.h',
14    'fru.h',
15    'instance-id.h',
16    'pdr.h',
17    'platform.h',
18    'pldm.h',
19    'pldm_types.h',
20    'state_set.h',
21    'states.h',
22    'transport.h',
23    'transport/af-mctp.h',
24    'transport/mctp-demux.h',
25)
26
27if get_option('oem').contains('ibm')
28    libpldm_headers += files(
29        'oem/ibm/entity.h',
30        'oem/ibm/file_io.h',
31        'oem/ibm/fru.h',
32        'oem/ibm/host.h',
33        'oem/ibm/platform.h',
34        'oem/ibm/state_set.h',
35    )
36endif
37
38if get_option('oem').contains('meta')
39    libpldm_headers += files('oem/meta/file_io.h')
40endif
41
42
43install_headers(libpldm_headers, subdir: 'libpldm', preserve_path: true)
44
45# TODO: these should depend on the input headers so they rebuild
46# on changes, unclear how to do that.
47include_src = include_directories('../../src', is_system: true)
48sizeof_pldm_fd = compiler.sizeof(
49    'struct pldm_fd',
50    prefix: '#include "firmware_device/fd-internal.h"',
51    include_directories: [include_src, libpldm_include_dir],
52)
53sizeof_pldm_control = compiler.sizeof(
54    'struct pldm_control',
55    prefix: '#include "control-internal.h"',
56    include_directories: [include_src, libpldm_include_dir],
57)
58sizes_h = configure_file(
59    configuration: {
60        'sizeof_pldm_fd': sizeof_pldm_fd,
61        'sizeof_pldm_control': sizeof_pldm_control,
62    },
63    input: 'sizes.h.in',
64    output: 'sizes.h',
65    install: true,
66    install_dir: get_option('includedir') / 'libpldm',
67)
68