16199ccf4SJason M. Billsproject( 26199ccf4SJason M. Bills 'power-control', 36199ccf4SJason M. Bills 'cpp', 46199ccf4SJason M. Bills default_options: [ 56199ccf4SJason M. Bills 'warning_level=3', 648c94c59SJason M. Bills 'cpp_std=c++20' 76199ccf4SJason M. Bills ], 86199ccf4SJason M. Bills license: 'Apache-2.0', 96199ccf4SJason M. Bills version: '0.1', 106199ccf4SJason M. Bills meson_version: '>=0.57.0', 116199ccf4SJason M. Bills) 126199ccf4SJason M. Bills 136199ccf4SJason M. Billsadd_project_arguments( 146199ccf4SJason M. Bills '-Wno-psabi', 156199ccf4SJason M. Bills '-DBOOST_SYSTEM_NO_DEPRECATED', 166199ccf4SJason M. Bills '-DBOOST_ERROR_CODE_HEADER_ONLY', 176199ccf4SJason M. Bills '-DBOOST_NO_RTTI', 186199ccf4SJason M. Bills '-DBOOST_NO_TYPEID', 196199ccf4SJason M. Bills '-DBOOST_ALL_NO_LIB', 206199ccf4SJason M. Bills '-DBOOST_ASIO_DISABLE_THREADS', 216199ccf4SJason M. Bills language: 'cpp', 226199ccf4SJason M. Bills) 236199ccf4SJason M. Bills 246199ccf4SJason M. Billscpp_args = [] 256199ccf4SJason M. Bills 266199ccf4SJason M. Billsif get_option('chassis-system-reset').enabled() 276199ccf4SJason M. Bills cpp_args += '-DCHASSIS_SYSTEM_RESET' 286199ccf4SJason M. Billsendif 296199ccf4SJason M. Billsif get_option('use-plt-rst').enabled() 306199ccf4SJason M. Bills cpp_args += '-DUSE_PLT_RST' 316199ccf4SJason M. Billsendif 3299e8f9dfSAndrei Kartashevif get_option('use-acboot').enabled() 3399e8f9dfSAndrei Kartashev cpp_args += '-DUSE_ACBOOT' 3499e8f9dfSAndrei Kartashevendif 35*58e379d1SMatt Simmeringif get_option('ignore-soft-resets-during-post').enabled() 36*58e379d1SMatt Simmering cpp_args += '-DIGNORE_SOFT_RESETS_DURING_POST' 37*58e379d1SMatt Simmeringendif 386199ccf4SJason M. Bills 396199ccf4SJason M. Billsdeps = [ 40fd672c91SNan Zhou dependency('libgpiodcxx', default_options: ['bindings=cxx']), 416199ccf4SJason M. Bills dependency('systemd'), 42fd672c91SNan Zhou dependency('sdbusplus'), 43fd672c91SNan Zhou dependency('phosphor-logging'), 447ef52a8dSNan Zhou dependency('nlohmann_json'), 456199ccf4SJason M. Bills] 466199ccf4SJason M. Bills 476199ccf4SJason M. Billsexecutable( 486199ccf4SJason M. Bills 'power-control', 496199ccf4SJason M. Bills 'src/power_control.cpp', 5050fe8ee3SAndrei Kartashev include_directories: include_directories('src'), 516199ccf4SJason M. Bills cpp_args: cpp_args, 526199ccf4SJason M. Bills dependencies: deps, 536199ccf4SJason M. Bills install: true, 546199ccf4SJason M. Bills install_dir: get_option('bindir')) 556199ccf4SJason M. Bills 566199ccf4SJason M. Billssystemd = dependency('systemd') 576199ccf4SJason M. Billsif systemd.found() 586199ccf4SJason M. Bills install_data( 596199ccf4SJason M. Bills 'service_files/chassis-system-reset.service', 606199ccf4SJason M. Bills 'service_files/chassis-system-reset.target', 616199ccf4SJason M. Bills 'service_files/xyz.openbmc_project.Chassis.Control.Power@.service', 626199ccf4SJason M. Bills install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir')) 636199ccf4SJason M. Billsendif 646199ccf4SJason M. Bills 656199ccf4SJason M. Billsinstall_data( 666199ccf4SJason M. Bills 'config/power-config-host0.json', 676199ccf4SJason M. Bills install_dir: '/usr/share/x86-power-control/') 68