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 'getConfig.cpp', 38 include_directories : eStoraged_headers, 39 implicit_include_directories: false, 40 dependencies: [libeStoraged_deps, libeStoragedErase_dep], 41) 42 43libeStoraged = declare_dependency( 44 dependencies: libeStoraged_deps, 45 include_directories: eStoraged_headers, 46 link_with: libeStoraged_lib, 47) 48 49executable( 50 'eStoraged', 51 'main.cpp', 52 implicit_include_directories: false, 53 dependencies: libeStoraged, 54 install: true, 55 install_dir: get_option('bindir') 56) 57 58build_tests = get_option('tests') 59if not build_tests.disabled() 60 subdir('test') 61endif 62 63