1phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') 2phosphor_logging_dep = dependency('phosphor-logging') 3 4sdbusplus_dep = dependency('sdbusplus', required: false, include_type: 'system') 5if not sdbusplus_dep.found() 6 sdbusplus_proj = subproject('sdbusplus', required: true) 7 sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep') 8 sdbusplus = sdbusplus.as_system('system') 9endif 10 11stdplus_dep = dependency('stdplus') 12 13boost_dep = dependency('boost',version : '>=1.78.0', required : false, include_type: 'system') 14if not boost_dep.found() 15 subproject('boost', required: false) 16 boost_inc = include_directories('subprojects/boost_1_78_0/', is_system:true) 17 boost = declare_dependency(include_directories : boost_inc) 18 boost = boost.as_system('system') 19endif 20 21subdir('erase') 22 23libeStoraged_deps = [ 24 dependency('libcryptsetup'), 25 dependency('openssl'), 26 phosphor_dbus_interfaces_dep, 27 phosphor_logging_dep, 28 sdbusplus_dep, 29 stdplus_dep, 30 boost_dep, 31] 32 33libeStoraged_lib = static_library( 34 'eStoraged-lib', 35 'estoraged.cpp', 36 'util.cpp', 37 include_directories : eStoraged_headers, 38 implicit_include_directories: false, 39 dependencies: [libeStoraged_deps, libeStoragedErase_dep], 40) 41 42libeStoraged = declare_dependency( 43 dependencies: libeStoraged_deps, 44 include_directories: eStoraged_headers, 45 link_with: libeStoraged_lib, 46) 47 48executable( 49 'eStoraged', 50 'main.cpp', 51 implicit_include_directories: false, 52 dependencies: libeStoraged, 53 install: true, 54 install_dir: get_option('bindir') 55) 56 57build_tests = get_option('tests') 58if not build_tests.disabled() 59 subdir('test') 60endif 61 62