blob: c757d267485d1d7fc450e5ecf51816f54055ab0e [file] [log] [blame]
Jason M. Bills69ae8082025-08-01 08:53:34 -07001project(
2 'hsbp-manager',
3 'cpp',
4 version: '1.1.1',
5 meson_version: '>=1.1.1',
6 default_options: ['cpp_std=c++23'],
7)
8
Rashmi R V2ac1af72025-07-24 23:59:30 +05309# Compiler flags
10cpp_args = [
11 '-lstdc++fs',
12 '-Werror',
13 '-Wall',
14 '-Wextra',
15 '-Wshadow',
16 '-Wnon-virtual-dtor',
17 '-Wold-style-cast',
18 '-Wcast-align',
19 '-Wunused',
20 '-Woverloaded-virtual',
21 '-Wpedantic',
22 '-Wconversion',
23 '-Wmisleading-indentation',
24 '-Wduplicated-cond',
25 '-Wduplicated-branches',
26 '-Wlogical-op',
27 '-Wnull-dereference',
28 '-Wuseless-cast',
29 '-Wdouble-promotion',
30 '-Wformat=2',
31 '-fno-rtti',
32]
33
Rashmi R V2ac1af72025-07-24 23:59:30 +053034# Definitions
35add_project_arguments(
36 '-DBOOST_ERROR_CODE_HEADER_ONLY',
37 '-DBOOST_SYSTEM_NO_DEPRECATED',
38 '-DBOOST_ALL_NO_LIB',
39 '-DBOOST_NO_RTTI',
40 '-DBOOST_NO_TYPEID',
41 '-DBOOST_ASIO_DISABLE_THREADS',
42 language: 'cpp',
43)
44
45# Include directories
46inc = include_directories('include')
47
48cpp = meson.get_compiler('cpp')
49boost = dependency('boost', version: '1.86.0', required: false)
50sdbusplus = dependency('sdbusplus', required: true)
Rashmi R V2ac1af72025-07-24 23:59:30 +053051i2c_dep = cpp.find_library('i2c')
52gpiodcxx = dependency('libgpiodcxx', default_options: ['bindings=cxx'])
53
54incdir = include_directories('include')
55
56executable(
57 'hsbp-manager',
58 'src/hsbp_manager.cpp',
59 include_directories: incdir,
Jason M. Bills69ae8082025-08-01 08:53:34 -070060 dependencies: [boost, i2c_dep, sdbusplus, gpiodcxx],
Rashmi R V2ac1af72025-07-24 23:59:30 +053061)
62# Systemd service files
Jason M. Bills69ae8082025-08-01 08:53:34 -070063systemd_system_unit_dir = dependency('systemd').get_variable(
Rashmi R V2ac1af72025-07-24 23:59:30 +053064 'systemdsystemunitdir',
65)
66
67install_data(
68 'service_files/hsbp-manager.service',
69 install_dir: systemd_system_unit_dir,
70)