Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 1 | project( |
| 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 | |
| 13 | add_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 | |
| 24 | build_tests = get_option('tests') |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 25 | gpiodcxx = dependency('libgpiodcxx') |
| 26 | i2c = meson.get_compiler('cpp').find_library('i2c') |
| 27 | sdbusplus = dependency('sdbusplus') |
| 28 | mctp = meson.get_compiler('cpp').find_library('mctp', required : false) |
| 29 | systemd = dependency('systemd') |
| 30 | systemd_system_unit_dir = systemd.get_pkgconfig_variable( |
| 31 | 'systemdsystemunitdir', |
| 32 | define_variable: ['prefix', get_option('prefix')]) |
| 33 | threads = dependency('threads') |
| 34 | |
| 35 | thresholds_a = static_library( |
| 36 | 'thresholds_a', |
| 37 | 'src/Thresholds.cpp', |
| 38 | implicit_include_directories: false, |
| 39 | include_directories: 'include', |
| 40 | ) |
| 41 | |
| 42 | utils_a = static_library( |
| 43 | 'utils_a', |
| 44 | 'src/Utils.cpp', |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 45 | implicit_include_directories: false, |
| 46 | include_directories: 'include', |
| 47 | ) |
| 48 | |
| 49 | pwmsensor_a = static_library( |
| 50 | 'pwmsensor_a', |
| 51 | 'src/PwmSensor.cpp', |
| 52 | implicit_include_directories: false, |
| 53 | include_directories: 'include', |
| 54 | ) |
| 55 | |
| 56 | |
| 57 | subdir('service_files') |
| 58 | subdir('src') |
| 59 | |
| 60 | if not build_tests.disabled() |
| 61 | subdir('tests') |
| 62 | endif |