1templates_depends = files( 2 'example/example.yaml', 3 'example/test.yaml', 4 'templates/callbackgroup.mako.cpp', 5 'templates/conditional.mako.cpp', 6 'templates/count.mako.cpp', 7 'templates/median.mako.cpp', 8 'templates/generated.mako.hpp', 9 'templates/journal.mako.cpp', 10 'templates/elog.mako.cpp', 11 'templates/errors.mako.hpp', 12 'templates/method.mako.cpp', 13 'templates/resolve_errors.mako.cpp', 14 'templates/event.mako.cpp', 15) 16 17yamldir = get_option('YAML_PATH') 18if yamldir == '' 19 yamldir = meson.project_source_root() + '/src/example' 20endif 21 22generated_hpp = custom_target( 23 'generated.hpp', 24 command: [ 25 prog_python, 26 meson.project_source_root() + '/src/pdmgen.py', 27 '-t', 'generated.mako.hpp', 28 '-p', meson.project_source_root() + '/src/templates', 29 '-d', yamldir, 30 '-o', meson.current_build_dir() + '/generated.hpp', 31 '-e', meson.current_build_dir() + '/errors.hpp', 32 'generate-cpp' 33 ], 34 depend_files: templates_depends, 35 output: 'generated.hpp', 36) 37 38sources = [ 39 generated_hpp, 40 'elog.cpp', 41 'event_manager.cpp', 42 'event_serialize.cpp', 43 'journal.cpp', 44 'main.cpp', 45 'pathwatch.cpp', 46 'propertywatch.cpp', 47 'resolve_errors.cpp', 48 'snmp_trap.cpp', 49] 50 51deps = [ 52 sdbusplus_dep, 53 sdeventplus_dep, 54 phosphor_dbus_interfaces_dep, 55 phosphor_logging_dep, 56 phosphor_snmp_dep, 57] 58 59executable( 60 'phosphor-dbus-monitor', 61 sources, 62 include_directories: ['..'], 63 implicit_include_directories: true, 64 dependencies: deps, 65 install: true, 66 install_dir: get_option('bindir'), 67) 68 69build_tests = get_option('tests') 70if not build_tests.disabled() 71 subdir('test') 72endif 73