1phosphor_logging_dep = dependency( 2 'phosphor-logging', 3 fallback: ['phosphor-logging', 'phosphor_logging_dep']) 4 5src_includes = include_directories('.') 6 7executable( 8 'ncsi-netlink', 9 'argument.cpp', 10 'ncsi_netlink_main.cpp', 11 'ncsi_util.cpp', 12 implicit_include_directories: false, 13 include_directories: src_includes, 14 dependencies: [ 15 dependency('fmt'), 16 dependency('libnl-3.0'), 17 dependency('libnl-genl-3.0'), 18 phosphor_dbus_interfaces_dep, 19 phosphor_logging_dep, 20 ], 21 install: true, 22 install_dir: get_option('bindir')) 23 24json_dep = declare_dependency() 25if get_option('sync-mac') 26 # nlohmann_json might not have a pkg-config. It is header only so just make 27 # sure we can access the needed symbols from the header. 28 has_json = meson.get_compiler('cpp').has_header_symbol( 29 'nlohmann/json.hpp', 30 'nlohmann::json::string_t', 31 required: false) 32 if not has_json 33 json_dep = dependency( 34 'nlohmann_json', 35 fallback: ['nlohmann_json', 'nlohmann_json_dep'], 36 required: true) 37 endif 38endif 39 40networkd_deps = [ 41 json_dep, 42 phosphor_dbus_interfaces_dep, 43 phosphor_logging_dep, 44 networkd_dbus_dep, 45 sdbusplus_dep, 46 dependency('sdeventplus', fallback: ['sdeventplus', 'sdeventplus_dep']), 47 dependency('stdplus', fallback: ['stdplus', 'stdplus_dep']), 48] 49 50conf_header = configure_file( 51 output: 'config.h', 52 configuration: conf_data) 53 54networkd_lib = static_library( 55 'networkd', 56 conf_header, 57 'ethernet_interface.cpp', 58 'neighbor.cpp', 59 'ipaddress.cpp', 60 'netlink.cpp', 61 'network_config.cpp', 62 'network_manager.cpp', 63 'system_configuration.cpp', 64 'util.cpp', 65 'routing_table.cpp', 66 'config_parser.cpp', 67 'dhcp_configuration.cpp', 68 'vlan_interface.cpp', 69 'rtnetlink_server.cpp', 70 'dns_updater.cpp', 71 'watch.cpp', 72 implicit_include_directories: false, 73 include_directories: src_includes, 74 dependencies: networkd_deps) 75 76networkd_dep = declare_dependency( 77 sources: conf_header, 78 dependencies: networkd_deps, 79 include_directories: src_includes, 80 link_with: networkd_lib) 81 82executable( 83 'phosphor-network-manager', 84 'network_manager_main.cpp', 85 implicit_include_directories: false, 86 dependencies: networkd_dep, 87 install: true, 88 install_dir: get_option('bindir')) 89