1 2cpp = meson.get_compiler('cpp') 3if cpp.has_header('nlohmann/json.hpp') 4 nlohmann_json_dep = declare_dependency() 5else 6 subproject('nlohmann', required: false) 7 nlohmann_json_dep = declare_dependency( 8 include_directories: [ 9 'subprojects/nlohmann/single_include', 10 'subprojects/nlohmann/single_include/nlohmann', 11 ] 12 ) 13endif 14 15rde_pre = declare_dependency( 16 include_directories: [rde_inc], 17 dependencies: [ 18 nlohmann_json_dep, 19 dependency('libbej'), 20 dependency('phosphor-dbus-interfaces'), 21 dependency('sdbusplus'), 22 ] 23) 24 25rde_lib = static_library( 26 'rde', 27 'rde_dictionary_manager.cpp', 28 'external_storer_file.cpp', 29 'rde_handler.cpp', 30 'notifier_dbus_handler.cpp', 31 implicit_include_directories: false, 32 dependencies: rde_pre) 33 34rde_dep = declare_dependency( 35 link_with: rde_lib, 36 dependencies: rde_pre) 37