blob: 3932a14241e5ca5fcdc636b215f942f0b5d44047 [file] [log] [blame]
Brad Bishopfeb19ef2019-11-07 18:02:16 -05001project(
2 'dbus-sensors',
3 'cpp',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
7 'cpp_std=c++17'
8 ],
9 license: 'Apache-2.0',
10 version: '0.1',
11)
12
13add_project_arguments(
14 '-DBOOST_SYSTEM_NO_DEPRECATED',
15 '-DBOOST_ERROR_CODE_HEADER_ONLY',
16 '-DBOOST_NO_RTTI',
17 '-DBOOST_NO_TYPEID',
18 '-DBOOST_ALL_NO_LIB',
19 '-DBOOST_ASIO_DISABLE_THREADS',
20 '-DBOOST_ALLOW_DEPRECATED_HEADERS',
21 language: 'cpp',
22)
23
24build_tests = get_option('tests')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050025gpiodcxx = dependency('libgpiodcxx')
26i2c = meson.get_compiler('cpp').find_library('i2c')
27sdbusplus = dependency('sdbusplus')
28mctp = meson.get_compiler('cpp').find_library('mctp', required : false)
29systemd = dependency('systemd')
30systemd_system_unit_dir = systemd.get_pkgconfig_variable(
31 'systemdsystemunitdir',
32 define_variable: ['prefix', get_option('prefix')])
33threads = dependency('threads')
34
35thresholds_a = static_library(
36 'thresholds_a',
37 'src/Thresholds.cpp',
38 implicit_include_directories: false,
39 include_directories: 'include',
40)
41
42utils_a = static_library(
43 'utils_a',
44 'src/Utils.cpp',
Brad Bishopfeb19ef2019-11-07 18:02:16 -050045 implicit_include_directories: false,
46 include_directories: 'include',
47)
48
49pwmsensor_a = static_library(
50 'pwmsensor_a',
51 'src/PwmSensor.cpp',
52 implicit_include_directories: false,
53 include_directories: 'include',
54)
55
56
57subdir('service_files')
58subdir('src')
59
60if not build_tests.disabled()
61 subdir('tests')
62endif