Deepak Kodihalli | 3c275e1 | 2019-09-21 06:39:39 -0500 | [diff] [blame] | 1 | headers = [ |
| 2 | 'base.h', |
| 3 | 'pldm_types.h', |
| 4 | 'platform.h', |
| 5 | 'bios.h', |
| 6 | 'states.h', |
| 7 | ] |
| 8 | |
| 9 | sources = [ |
| 10 | 'base.c', |
| 11 | 'platform.c', |
| 12 | 'bios.c' |
| 13 | ] |
| 14 | |
| 15 | libpldm_headers = ['.', '..'] |
| 16 | |
| 17 | if get_option('oem-ibm').enabled() |
| 18 | headers += [ |
| 19 | '../oem/ibm/libpldm/file_io.h' |
| 20 | ] |
| 21 | sources += [ |
| 22 | '../oem/ibm/libpldm/file_io.c' |
| 23 | ] |
| 24 | libpldm_headers += ['../oem/ibm'] |
| 25 | endif |
| 26 | |
| 27 | install_headers( |
| 28 | headers, |
| 29 | subdir: 'libpldm') |
| 30 | |
| 31 | libpldm = library( |
| 32 | 'libpldm', |
| 33 | sources, |
| 34 | implicit_include_directories: false, |
| 35 | include_directories: include_directories(libpldm_headers), |
| 36 | version: meson.project_version(), |
| 37 | install: true) |
| 38 | |
| 39 | libpldm = declare_dependency( |
| 40 | include_directories: include_directories(libpldm_headers), |
| 41 | link_with: libpldm) |
| 42 | |
| 43 | import('pkgconfig').generate( |
| 44 | name: 'libpldm', |
| 45 | description: 'PLDM protocol encode/decode C lib', |
| 46 | version: meson.project_version(), |
| 47 | libraries: libpldm) |