1if cpp.has_header('CLI/CLI.hpp') 2 CLI11_dep = declare_dependency() 3else 4 CLI11_dep = dependency('CLI11') 5endif 6 7sdeventplus_dep = dependency('sdeventplus') 8 9source = [ 10 'usb_manager_main.cpp', 11 'usb_manager.cpp', 12 '../utils.cpp', 13 ] 14 15executable( 16 'phosphor-usb-code-update', 17 source, 18 include_directories: ['..'], 19 dependencies: [ 20 CLI11_dep, 21 pdi_dep, 22 phosphor_logging_dep, 23 sdbusplus_dep, 24 sdeventplus_dep, 25 ], 26 install: true, 27 install_dir: get_option('bindir') 28) 29 30systemd_system_unit_dir = dependency('systemd').get_variable( 31 'systemdsystemunitdir', 32 pkgconfig_define: ['prefix', get_option('prefix')]) 33udev_dir = dependency('udev').get_variable( 34 'udev_dir', 35 pkgconfig_define: ['prefix', get_option('prefix')]) 36 37install_data( 38 'services/usb-code-update@.service', 39 install_dir: systemd_system_unit_dir 40) 41 42install_data( 43 '70-bmc-usb.rules', 44 install_dir: udev_dir / 'rules.d' 45) 46