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