16199ccf4SJason M. Billsproject( 26199ccf4SJason M. Bills 'power-control', 36199ccf4SJason M. Bills 'cpp', 48151f153SPatrick Williams default_options: ['warning_level=3', 'cpp_std=c++23'], 56199ccf4SJason M. Bills license: 'Apache-2.0', 66199ccf4SJason M. Bills version: '0.1', 7cc037b89SPatrick Williams meson_version: '>=1.1.1', 86199ccf4SJason M. Bills) 96199ccf4SJason M. Bills 106199ccf4SJason M. Billsadd_project_arguments( 116199ccf4SJason M. Bills '-Wno-psabi', 126199ccf4SJason M. Bills '-DBOOST_SYSTEM_NO_DEPRECATED', 136199ccf4SJason M. Bills '-DBOOST_ERROR_CODE_HEADER_ONLY', 146199ccf4SJason M. Bills '-DBOOST_NO_RTTI', 156199ccf4SJason M. Bills '-DBOOST_NO_TYPEID', 166199ccf4SJason M. Bills '-DBOOST_ALL_NO_LIB', 176199ccf4SJason M. Bills '-DBOOST_ASIO_DISABLE_THREADS', 186199ccf4SJason M. Bills language: 'cpp', 196199ccf4SJason M. Bills) 206199ccf4SJason M. Bills 216199ccf4SJason M. Billscpp_args = [] 226199ccf4SJason M. Bills 2368ea8319SPatrick Williamsif get_option('chassis-system-reset').allowed() 246199ccf4SJason M. Bills cpp_args += '-DCHASSIS_SYSTEM_RESET' 256199ccf4SJason M. Billsendif 2668ea8319SPatrick Williamsif get_option('use-plt-rst').allowed() 276199ccf4SJason M. Bills cpp_args += '-DUSE_PLT_RST' 286199ccf4SJason M. Billsendif 2968ea8319SPatrick Williamsif get_option('use-acboot').allowed() 3099e8f9dfSAndrei Kartashev cpp_args += '-DUSE_ACBOOT' 3199e8f9dfSAndrei Kartashevendif 3268ea8319SPatrick Williamsif get_option('ignore-soft-resets-during-post').allowed() 3358e379d1SMatt Simmering cpp_args += '-DIGNORE_SOFT_RESETS_DURING_POST' 3458e379d1SMatt Simmeringendif 3505e8ea8eSRenze Nicolaiif get_option('button-passthrough').allowed() 3605e8ea8eSRenze Nicolai cpp_args += '-DUSE_BUTTON_PASSTHROUGH' 3705e8ea8eSRenze Nicolaiendif 386199ccf4SJason M. Bills 396199ccf4SJason M. Billsdeps = [ 40fd672c91SNan Zhou dependency('libgpiodcxx', default_options: ['bindings=cxx']), 41*9bdeb87aSPatrick Williams dependency('libsystemd'), 42fd672c91SNan Zhou dependency('sdbusplus'), 43fd672c91SNan Zhou dependency('phosphor-logging'), 44b1e34a11SPatrick Williams dependency('nlohmann_json', include_type: 'system'), 4561ccc499SKonstantin Aladyshev dependency('boost'), 466199ccf4SJason M. Bills] 476199ccf4SJason M. Bills 486199ccf4SJason M. Billsexecutable( 496199ccf4SJason M. Bills 'power-control', 506199ccf4SJason M. Bills 'src/power_control.cpp', 5150fe8ee3SAndrei Kartashev include_directories: include_directories('src'), 526199ccf4SJason M. Bills cpp_args: cpp_args, 536199ccf4SJason M. Bills dependencies: deps, 546199ccf4SJason M. Bills install: true, 558151f153SPatrick Williams install_dir: get_option('bindir'), 568151f153SPatrick Williams) 576199ccf4SJason M. Bills 586199ccf4SJason M. Billssystemd = dependency('systemd') 596199ccf4SJason M. Billsif systemd.found() 606199ccf4SJason M. Bills install_data( 616199ccf4SJason M. Bills 'service_files/chassis-system-reset.service', 626199ccf4SJason M. Bills 'service_files/chassis-system-reset.target', 636199ccf4SJason M. Bills 'service_files/xyz.openbmc_project.Chassis.Control.Power@.service', 648151f153SPatrick Williams install_dir: systemd.get_variable('systemdsystemunitdir'), 658151f153SPatrick Williams ) 666199ccf4SJason M. Billsendif 676199ccf4SJason M. Bills 686199ccf4SJason M. Billsinstall_data( 696199ccf4SJason M. Bills 'config/power-config-host0.json', 708151f153SPatrick Williams install_dir: '/usr/share/x86-power-control/', 718151f153SPatrick Williams) 72