1project( 2 'witherspoon-pfault-analysis', 3 'cpp', 4 default_options: [ 5 'warning_level=3', 6 'werror=true', 7 'cpp_std=c++17' 8 ], 9 license: 'Apache-2.0', 10 version: '1.0', 11) 12 13build_tests = get_option('tests') 14 15cppfs = meson.get_compiler('cpp').find_library('stdc++fs') 16gmock = dependency('gmock', disabler: true, required: build_tests) 17gtest = dependency('gtest', main: true, disabler: true, required: build_tests) 18phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces') 19phosphor_logging = dependency('phosphor-logging') 20prog_python = import('python').find_installation('python3') 21sdbusplus = dependency('sdbusplus') 22sdbuspp = find_program('sdbus++') 23sdeventplus = dependency('sdeventplus') 24 25conf = configuration_data() 26conf.set_quoted( 27 'INPUT_HISTORY_BUSNAME_ROOT', get_option('input-history-busname-root')) 28conf.set_quoted( 29 'INPUT_HISTORY_SENSOR_ROOT', get_option('input-history-sensor-root')) 30conf.set10( 31 'UCD90160_DEVICE_ACCESS', get_option('ucd90160-access')) 32 33configure_file(output: 'config.h', configuration: conf) 34 35# Ensure the generated header here winds up in the correct path in the build 36# tree such that it actually get used and doesn't get found in the sysroot 37# somewhere. Meson doesn't allow path elements (rightfully so) when specifying 38# the output filename of a target definition so the target must be defined in 39# the directory where the artifacts need to be placed. Do that now, because 40# the generated source (cpp) is needed to define the library target. 41subdir('org/open_power/Witherspoon/Fault') 42 43libpower = static_library( 44 'power', 45 error_cpp, 46 error_hpp, 47 'gpio.cpp', 48 'pmbus.cpp', 49 'utility.cpp', 50 dependencies: [ 51 cppfs, 52 phosphor_dbus_interfaces, 53 phosphor_logging, 54 sdbusplus, 55 sdeventplus, 56 ], 57) 58 59subdir('power-sequencer') 60subdir('power-supply') 61subdir('test') 62