10c2808f0SPatrick Williamsphosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') 20c2808f0SPatrick Williamsphosphor_logging_dep = dependency('phosphor-logging') 367a47446SJohn Wedig 467a47446SJohn Wedigsdbusplus_dep = dependency('sdbusplus', required: false, include_type: 'system') 567a47446SJohn Wedigif not sdbusplus_dep.found() 667a47446SJohn Wedig sdbusplus_proj = subproject('sdbusplus', required: true) 767a47446SJohn Wedig sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep') 867a47446SJohn Wedig sdbusplus = sdbusplus.as_system('system') 967a47446SJohn Wedigendif 1067a47446SJohn Wedig 110c2808f0SPatrick Williamsstdplus_dep = dependency('stdplus') 122098dabeSJohn Wedig 1367a47446SJohn Wedigboost_dep = dependency('boost',version : '>=1.78.0', required : false, include_type: 'system') 1467a47446SJohn Wedigif not boost_dep.found() 1567a47446SJohn Wedig subproject('boost', required: false) 1667a47446SJohn Wedig boost_inc = include_directories('subprojects/boost_1_78_0/', is_system:true) 1767a47446SJohn Wedig boost = declare_dependency(include_directories : boost_inc) 1867a47446SJohn Wedig boost = boost.as_system('system') 1967a47446SJohn Wedigendif 2067a47446SJohn Wedig 21e6ffe704SJohn Edward Broadbentsubdir('erase') 22e6ffe704SJohn Edward Broadbent 232098dabeSJohn WediglibeStoraged_deps = [ 24b810c926SJohn Wedig dependency('libcryptsetup'), 250c2808f0SPatrick Williams dependency('openssl'), 260c2808f0SPatrick Williams phosphor_dbus_interfaces_dep, 270c2808f0SPatrick Williams phosphor_logging_dep, 280c2808f0SPatrick Williams sdbusplus_dep, 290c2808f0SPatrick Williams stdplus_dep, 3067a47446SJohn Wedig boost_dep, 312098dabeSJohn Wedig] 322098dabeSJohn Wedig 332098dabeSJohn WediglibeStoraged_lib = static_library( 342098dabeSJohn Wedig 'eStoraged-lib', 352098dabeSJohn Wedig 'estoraged.cpp', 36a6e3b99dSJohn Edward Broadbent 'util.cpp', 37d32b9667SJohn Wedig 'getConfig.cpp', 382098dabeSJohn Wedig include_directories : eStoraged_headers, 392098dabeSJohn Wedig implicit_include_directories: false, 40e6ffe704SJohn Edward Broadbent dependencies: [libeStoraged_deps, libeStoragedErase_dep], 412098dabeSJohn Wedig) 422098dabeSJohn Wedig 432098dabeSJohn WediglibeStoraged = declare_dependency( 442098dabeSJohn Wedig dependencies: libeStoraged_deps, 452098dabeSJohn Wedig include_directories: eStoraged_headers, 46e6ffe704SJohn Edward Broadbent link_with: libeStoraged_lib, 47e6ffe704SJohn Edward Broadbent) 482098dabeSJohn Wedig 492098dabeSJohn Wedigexecutable( 502098dabeSJohn Wedig 'eStoraged', 512098dabeSJohn Wedig 'main.cpp', 522098dabeSJohn Wedig implicit_include_directories: false, 532098dabeSJohn Wedig dependencies: libeStoraged, 542098dabeSJohn Wedig install: true, 552098dabeSJohn Wedig install_dir: get_option('bindir') 562098dabeSJohn Wedig) 57b810c926SJohn Wedig 58b810c926SJohn Wedigbuild_tests = get_option('tests') 59*b650879bSGeorge Liuif build_tests.allowed() 60b810c926SJohn Wedig subdir('test') 61b810c926SJohn Wedigendif 62b810c926SJohn Wedig 63