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 13*620d1a51SKonstantin Aladyshevboost_dep = dependency('boost',version : '>=1.78.0', include_type: 'system') 1467a47446SJohn Wedig 15e6ffe704SJohn Edward Broadbentsubdir('erase') 16e6ffe704SJohn Edward Broadbent 172098dabeSJohn WediglibeStoraged_deps = [ 18b810c926SJohn Wedig dependency('libcryptsetup'), 190c2808f0SPatrick Williams dependency('openssl'), 200c2808f0SPatrick Williams phosphor_dbus_interfaces_dep, 210c2808f0SPatrick Williams phosphor_logging_dep, 220c2808f0SPatrick Williams sdbusplus_dep, 230c2808f0SPatrick Williams stdplus_dep, 2467a47446SJohn Wedig boost_dep, 252098dabeSJohn Wedig] 262098dabeSJohn Wedig 272098dabeSJohn WediglibeStoraged_lib = static_library( 282098dabeSJohn Wedig 'eStoraged-lib', 292098dabeSJohn Wedig 'estoraged.cpp', 30a6e3b99dSJohn Edward Broadbent 'util.cpp', 31d32b9667SJohn Wedig 'getConfig.cpp', 322098dabeSJohn Wedig include_directories : eStoraged_headers, 332098dabeSJohn Wedig implicit_include_directories: false, 34e6ffe704SJohn Edward Broadbent dependencies: [libeStoraged_deps, libeStoragedErase_dep], 352098dabeSJohn Wedig) 362098dabeSJohn Wedig 372098dabeSJohn WediglibeStoraged = declare_dependency( 382098dabeSJohn Wedig dependencies: libeStoraged_deps, 392098dabeSJohn Wedig include_directories: eStoraged_headers, 40e6ffe704SJohn Edward Broadbent link_with: libeStoraged_lib, 41e6ffe704SJohn Edward Broadbent) 422098dabeSJohn Wedig 432098dabeSJohn Wedigexecutable( 442098dabeSJohn Wedig 'eStoraged', 452098dabeSJohn Wedig 'main.cpp', 462098dabeSJohn Wedig implicit_include_directories: false, 472098dabeSJohn Wedig dependencies: libeStoraged, 482098dabeSJohn Wedig install: true, 492098dabeSJohn Wedig install_dir: get_option('bindir') 502098dabeSJohn Wedig) 51b810c926SJohn Wedig 52b810c926SJohn Wedigbuild_tests = get_option('tests') 53b650879bSGeorge Liuif build_tests.allowed() 54b810c926SJohn Wedig subdir('test') 55b810c926SJohn Wedigendif 56b810c926SJohn Wedig 57