139b370a5SBrad Bishopproject( 239b370a5SBrad Bishop 'witherspoon-pfault-analysis', 339b370a5SBrad Bishop 'cpp', 439b370a5SBrad Bishop default_options: [ 539b370a5SBrad Bishop 'warning_level=3', 639b370a5SBrad Bishop 'werror=true', 7*b1dc2b21SPatrick Williams 'cpp_std=c++23' 839b370a5SBrad Bishop ], 939b370a5SBrad Bishop license: 'Apache-2.0', 1039b370a5SBrad Bishop version: '1.0', 11*b1dc2b21SPatrick Williams meson_version: '>=1.1.1', 1239b370a5SBrad Bishop) 1339b370a5SBrad Bishop 1439b370a5SBrad Bishopbuild_tests = get_option('tests') 1539b370a5SBrad Bishop 1639b370a5SBrad Bishopgmock = dependency('gmock', disabler: true, required: build_tests) 1739b370a5SBrad Bishopgtest = dependency('gtest', main: true, disabler: true, required: build_tests) 1839b370a5SBrad Bishopphosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces') 1939b370a5SBrad Bishopphosphor_logging = dependency('phosphor-logging') 20f29a6f1aSPatrick Williamsprog_python = import('python').find_installation('python3') 2139b370a5SBrad Bishopsdbusplus = dependency('sdbusplus') 2239b370a5SBrad Bishopsdbuspp = find_program('sdbus++') 2339b370a5SBrad Bishopsdeventplus = dependency('sdeventplus') 2439b370a5SBrad Bishop 2539b370a5SBrad Bishopconf = configuration_data() 2639b370a5SBrad Bishopconf.set_quoted( 2739b370a5SBrad Bishop 'INPUT_HISTORY_BUSNAME_ROOT', get_option('input-history-busname-root')) 2839b370a5SBrad Bishopconf.set_quoted( 2939b370a5SBrad Bishop 'INPUT_HISTORY_SENSOR_ROOT', get_option('input-history-sensor-root')) 3039b370a5SBrad Bishopconf.set10( 3139b370a5SBrad Bishop 'UCD90160_DEVICE_ACCESS', get_option('ucd90160-access')) 3239b370a5SBrad Bishop 3339b370a5SBrad Bishopconfigure_file(output: 'config.h', configuration: conf) 3439b370a5SBrad Bishop 3539b370a5SBrad Bishop# Ensure the generated header here winds up in the correct path in the build 3639b370a5SBrad Bishop# tree such that it actually get used and doesn't get found in the sysroot 3739b370a5SBrad Bishop# somewhere. Meson doesn't allow path elements (rightfully so) when specifying 3839b370a5SBrad Bishop# the output filename of a target definition so the target must be defined in 3939b370a5SBrad Bishop# the directory where the artifacts need to be placed. Do that now, because 4039b370a5SBrad Bishop# the generated source (cpp) is needed to define the library target. 4139b370a5SBrad Bishopsubdir('org/open_power/Witherspoon/Fault') 4239b370a5SBrad Bishop 4339b370a5SBrad Bishoplibpower = static_library( 4439b370a5SBrad Bishop 'power', 4539b370a5SBrad Bishop error_cpp, 4639b370a5SBrad Bishop error_hpp, 4739b370a5SBrad Bishop 'gpio.cpp', 4839b370a5SBrad Bishop 'pmbus.cpp', 4939b370a5SBrad Bishop 'utility.cpp', 5039b370a5SBrad Bishop dependencies: [ 5139b370a5SBrad Bishop phosphor_dbus_interfaces, 5239b370a5SBrad Bishop phosphor_logging, 5339b370a5SBrad Bishop sdbusplus, 5439b370a5SBrad Bishop sdeventplus, 5539b370a5SBrad Bishop ], 5639b370a5SBrad Bishop) 5739b370a5SBrad Bishop 5839b370a5SBrad Bishopsubdir('power-sequencer') 5939b370a5SBrad Bishopsubdir('power-supply') 6039b370a5SBrad Bishopsubdir('test') 61