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