blob: bbbc1653136bb128fe12912f791933953fd19601 [file] [log] [blame]
Patrick Williams0c2808f2022-02-25 09:35:14 -06001phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
2phosphor_logging_dep = dependency('phosphor-logging')
John Wedig67a47442022-04-05 17:21:29 -07003
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
Patrick Williams0c2808f2022-02-25 09:35:14 -060011stdplus_dep = dependency('stdplus')
John Wedig2098dab2021-09-14 13:56:28 -070012
Konstantin Aladyshev620d1a52024-03-29 18:16:17 +030013boost_dep = dependency('boost',version : '>=1.78.0', include_type: 'system')
John Wedig67a47442022-04-05 17:21:29 -070014
John Edward Broadbente6ffe702021-10-14 14:03:11 -070015subdir('erase')
16
John Wedig2098dab2021-09-14 13:56:28 -070017libeStoraged_deps = [
John Wedigb810c922021-11-17 16:38:03 -080018 dependency('libcryptsetup'),
Patrick Williams0c2808f2022-02-25 09:35:14 -060019 dependency('openssl'),
20 phosphor_dbus_interfaces_dep,
21 phosphor_logging_dep,
22 sdbusplus_dep,
23 stdplus_dep,
John Wedig67a47442022-04-05 17:21:29 -070024 boost_dep,
John Wedig2098dab2021-09-14 13:56:28 -070025]
26
27libeStoraged_lib = static_library(
28 'eStoraged-lib',
29 'estoraged.cpp',
John Edward Broadbenta6e3b992022-03-17 14:33:15 -070030 'util.cpp',
John Wedigd32b9662022-04-13 18:12:25 -070031 'getConfig.cpp',
John Wedig2098dab2021-09-14 13:56:28 -070032 include_directories : eStoraged_headers,
33 implicit_include_directories: false,
John Edward Broadbente6ffe702021-10-14 14:03:11 -070034 dependencies: [libeStoraged_deps, libeStoragedErase_dep],
John Wedig2098dab2021-09-14 13:56:28 -070035)
36
37libeStoraged = declare_dependency(
38 dependencies: libeStoraged_deps,
39 include_directories: eStoraged_headers,
John Edward Broadbente6ffe702021-10-14 14:03:11 -070040 link_with: libeStoraged_lib,
41)
John Wedig2098dab2021-09-14 13:56:28 -070042
43executable(
44 'eStoraged',
45 'main.cpp',
46 implicit_include_directories: false,
47 dependencies: libeStoraged,
48 install: true,
49 install_dir: get_option('bindir')
50)
John Wedigb810c922021-11-17 16:38:03 -080051
52build_tests = get_option('tests')
George Liub6508792023-08-07 17:26:36 +080053if build_tests.allowed()
John Wedigb810c922021-11-17 16:38:03 -080054 subdir('test')
55endif
56