Jason M. Bills | 3570b9e | 2023-07-31 12:26:30 -0700 | [diff] [blame^] | 1 | project( |
| 2 | 'peci-pcie', |
| 3 | 'cpp', |
| 4 | version : '1.0', |
| 5 | meson_version: '>=1.1.1', |
| 6 | default_options: [ |
| 7 | 'b_ndebug=if-release', |
| 8 | 'cpp_rtti=false', |
| 9 | 'cpp_std=c++20', |
| 10 | 'warning_level=3', |
| 11 | 'werror=true', |
| 12 | ] |
| 13 | ) |
| 14 | |
| 15 | if(get_option('wait-for-os-standby').enabled()) |
| 16 | add_project_arguments('-DWAIT_FOR_OS_STANDBY', language : 'cpp') |
| 17 | endif |
| 18 | |
| 19 | if(get_option('use-rdendpointcfg').enabled()) |
| 20 | add_project_arguments('-DUSE_RDENDPOINTCFG', language : 'cpp') |
| 21 | endif |
| 22 | |
| 23 | sdbusplus = dependency('sdbusplus') |
| 24 | |
| 25 | systemd = dependency('systemd', required: true) |
| 26 | systemd_system_unit_dir = systemd.get_variable(pkgconfig: |
| 27 | 'systemdsystemunitdir' |
| 28 | ) |
| 29 | |
| 30 | peci = dependency('libpeci') |
| 31 | |
| 32 | boost = dependency('boost', version: '>=1.82') |
| 33 | add_project_arguments( |
| 34 | [ |
| 35 | '-DBOOST_ASIO_DISABLE_THREADS', |
| 36 | '-DBOOST_ASIO_EXCEPTION_DISABLE', |
| 37 | '-DBOOST_ASIO_NO_DEPRECATED', |
| 38 | '-DBOOST_NO_RTTI', |
| 39 | '-DBOOST_NO_TYPEID', |
| 40 | ], |
| 41 | language : 'cpp' |
| 42 | ) |
| 43 | |
| 44 | executable( |
| 45 | 'peci-pcie', |
| 46 | 'src/peci_pcie.cpp', |
| 47 | include_directories: include_directories('include'), |
| 48 | dependencies: [ |
| 49 | boost, |
| 50 | peci, |
| 51 | sdbusplus, |
| 52 | ], |
| 53 | install: true, |
| 54 | ) |
| 55 | |
| 56 | subdir('service_files') |