1if cpp.has_header('CLI/CLI.hpp')
2    CLI11_dep = declare_dependency()
3else
4    CLI11_dep = dependency(
5        'CLI11',
6        fallback: [ 'CLI11', 'CLI11_dep' ],
7    )
8endif
9
10source = [
11    'usb_manager_main.cpp',
12    'usb_manager.cpp',
13    '../utils.cpp',
14    ]
15
16sdeventplus_dep = dependency(
17    'sdeventplus',
18    fallback: [
19        'sdeventplus',
20        'sdeventplus_dep'
21    ],
22)
23
24phosphor_logging_dep = dependency(
25    'phosphor-logging',
26    fallback: ['phosphor-logging', 'phosphor_logging_dep'],
27)
28
29executable(
30    'phosphor-usb-code-update',
31    source,
32    include_directories: ['..'],
33    dependencies: [
34        CLI11_dep,
35        phosphor_logging_dep,
36        sdbusplus_dep,
37        sdeventplus_dep,
38    ],
39    install: true,
40    install_dir: get_option('bindir')
41)
42