Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 1 | project( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 2 | 'phosphor-host-ipmid', |
| 3 | 'cpp', |
| 4 | version: '0.1', |
| 5 | meson_version: '>=1.1.1', |
| 6 | default_options: [ |
| 7 | 'werror=true', |
| 8 | 'warning_level=3', |
| 9 | 'cpp_std=c++23', |
| 10 | 'b_lto=true', |
| 11 | ], |
| 12 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 13 | |
| 14 | # Setting up config data |
| 15 | conf_data = configuration_data() |
| 16 | |
| 17 | # The name of the callout's forward association |
| 18 | conf_data.set_quoted('CALLOUT_FWD_ASSOCIATION', 'callout') |
| 19 | conf_data.set_quoted('BOARD_SENSOR', get_option('board-sensor')) |
| 20 | conf_data.set_quoted('SYSTEM_SENSOR', get_option('system-sensor')) |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 21 | conf_data.set( |
| 22 | 'IPMI_SMS_ATN_ACK_TIMEOUT_SECS', |
| 23 | get_option('ipmi-sms-atn-ack-timeout-secs'), |
| 24 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 25 | |
| 26 | # Soft Power off related. |
Patrick Williams | ed7dbef | 2025-02-07 10:54:37 -0500 | [diff] [blame] | 27 | if get_option('softoff').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 28 | conf_data.set_quoted('SOFTOFF_BUSNAME', get_option('softoff-busname')) |
| 29 | conf_data.set_quoted('SOFTOFF_OBJPATH', get_option('softoff-objpath')) |
| 30 | conf_data.set( |
| 31 | 'IPMI_HOST_SHUTDOWN_COMPLETE_TIMEOUT_SECS', |
| 32 | get_option('ipmi-host-shutdown-complete-timeout-secs'), |
| 33 | ) |
| 34 | conf_data.set_quoted( |
| 35 | 'HOST_INBAND_REQUEST_DIR', |
| 36 | get_option('host-inband-request-dir'), |
| 37 | ) |
| 38 | conf_data.set_quoted( |
| 39 | 'HOST_INBAND_REQUEST_FILE', |
| 40 | get_option('host-inband-request-file'), |
| 41 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 42 | endif |
| 43 | |
| 44 | conf_data.set_quoted('CONTROL_HOST_BUSNAME', get_option('control-host-busname')) |
| 45 | conf_data.set_quoted('CONTROL_HOST_OBJ_MGR', get_option('control-host-obj-mgr')) |
| 46 | conf_data.set_quoted('HOST_NAME', get_option('host-name')) |
| 47 | conf_data.set_quoted('POWER_READING_SENSOR', get_option('power-reading-sensor')) |
| 48 | conf_data.set_quoted('HOST_IPMI_LIB_PATH', get_option('host-ipmi-lib-path')) |
Potin Lai | 5d21420 | 2023-01-16 18:11:49 +0800 | [diff] [blame] | 49 | conf_data.set_quoted('FW_VER_REGEX', get_option('fw-ver-regex')) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 50 | |
Patrick Williams | 833b706 | 2023-11-29 06:43:54 -0600 | [diff] [blame] | 51 | if get_option('shortname-remove-suffix').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 52 | conf_data.set_quoted('SHORTNAME_REMOVE_SUFFIX', '1') |
Alexander Hansen | c2c26f9 | 2023-07-17 09:38:43 +0200 | [diff] [blame] | 53 | endif |
Patrick Williams | 833b706 | 2023-11-29 06:43:54 -0600 | [diff] [blame] | 54 | if get_option('shortname-replace-words').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 55 | conf_data.set_quoted('SHORTNAME_REPLACE_WORDS', '1') |
Alexander Hansen | c2c26f9 | 2023-07-17 09:38:43 +0200 | [diff] [blame] | 56 | endif |
Patrick Williams | 768730d | 2023-09-06 16:27:20 -0500 | [diff] [blame] | 57 | if get_option('open-power').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 58 | conf_data.set_quoted('OPEN_POWER_SUPPORT', '1') |
Patrick Williams | 768730d | 2023-09-06 16:27:20 -0500 | [diff] [blame] | 59 | endif |
Alexander Hansen | c2c26f9 | 2023-07-17 09:38:43 +0200 | [diff] [blame] | 60 | |
Potin Lai | c7c5592 | 2023-02-16 10:33:55 +0800 | [diff] [blame] | 61 | matches_map = get_option('matches-map') |
| 62 | conf_data.set('MAJOR_MATCH_INDEX', matches_map[0]) |
| 63 | conf_data.set('MINOR_MATCH_INDEX', matches_map[1]) |
| 64 | conf_data.set('AUX_0_MATCH_INDEX', matches_map[2]) |
| 65 | conf_data.set('AUX_1_MATCH_INDEX', matches_map[3]) |
| 66 | conf_data.set('AUX_2_MATCH_INDEX', matches_map[4]) |
| 67 | conf_data.set('AUX_3_MATCH_INDEX', matches_map[5]) |
| 68 | |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 69 | conf_h = configure_file(output: 'config.h', configuration: conf_data) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 70 | |
| 71 | root = meson.current_source_dir() |
| 72 | root_inc = include_directories('.', 'include') |
| 73 | |
| 74 | # Project Arguments |
| 75 | cpp = meson.get_compiler('cpp') |
| 76 | add_project_arguments( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 77 | cpp.get_supported_arguments( |
| 78 | [ |
| 79 | '-DBOOST_ERROR_CODE_HEADER_ONLY', |
| 80 | '-DBOOST_SYSTEM_NO_DEPRECATED', |
| 81 | '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING', |
| 82 | '-DBOOST_ASIO_DISABLE_THREADS', |
| 83 | '-DBOOST_ALL_NO_LIB', |
| 84 | ], |
| 85 | ), |
| 86 | language: 'cpp', |
| 87 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 88 | |
Patrick Williams | ed7dbef | 2025-02-07 10:54:37 -0500 | [diff] [blame] | 89 | if get_option('get-dbus-active-software').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 90 | add_project_arguments( |
| 91 | cpp.get_supported_arguments(['-DGET_DBUS_ACTIVE_SOFTWARE']), |
| 92 | language: 'cpp', |
| 93 | ) |
Willy Tu | b78184e | 2022-10-27 22:57:38 +0000 | [diff] [blame] | 94 | endif |
| 95 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 96 | feature_map = { |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 97 | 'boot-flag-safe-mode-support': '-DENABLE_BOOT_FLAG_SAFE_MODE_SUPPORT', |
| 98 | 'i2c-whitelist-check' : '-DENABLE_I2C_WHITELIST_CHECK', |
| 99 | 'update-functional-on-fail' : '-DUPDATE_FUNCTIONAL_ON_FAIL', |
| 100 | 'dynamic-sensors' : '-DFEATURE_DYNAMIC_SENSORS', |
| 101 | 'dynamic-sensors-write' : '-DFEATURE_DYNAMIC_SENSORS_WRITE', |
| 102 | 'entity-manager-decorators' : '-DUSING_ENTITY_MANAGER_DECORATORS', |
| 103 | 'hybrid-sensors' : '-DFEATURE_HYBRID_SENSORS', |
| 104 | 'sensors-cache' : '-DFEATURE_SENSORS_CACHE', |
| 105 | 'dynamic-storages-only' : '-DFEATURE_DYNAMIC_STORAGES_ONLY', |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | foreach option_key, option_value : feature_map |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 109 | if (get_option(option_key).allowed()) |
| 110 | summary(option_key, option_value, section: 'Enabled Features') |
| 111 | add_project_arguments(option_value, language: 'cpp') |
| 112 | endif |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 113 | endforeach |
| 114 | |
| 115 | add_project_arguments( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 116 | cpp.get_supported_arguments( |
| 117 | [ |
| 118 | '-Wno-psabi', |
| 119 | '-Wno-missing-field-initializers', |
| 120 | '-Wno-pedantic', |
| 121 | '-Wno-non-virtual-dtor', |
| 122 | ], |
| 123 | ), |
| 124 | language: 'cpp', |
| 125 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 126 | |
| 127 | # Dependencies |
Konstantin Aladyshev | e11895f | 2024-04-04 12:35:33 +0300 | [diff] [blame] | 128 | |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 129 | boost = dependency('boost', modules: ['coroutine'], required: false) |
Konstantin Aladyshev | e11895f | 2024-04-04 12:35:33 +0300 | [diff] [blame] | 130 | |
| 131 | if not boost.found() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 132 | cmake = import('cmake') |
| 133 | opt = cmake.subproject_options() |
| 134 | opt.add_cmake_defines( |
| 135 | { |
| 136 | 'BOOST_INCLUDE_LIBRARIES': 'asio;bimap;callable_traits;context;coroutine;interprocess;multiprecision;process', |
| 137 | 'CMAKE_POSITION_INDEPENDENT_CODE': true, |
| 138 | }, |
| 139 | ) |
| 140 | boost_cmake = cmake.subproject('boost', required: true, options: opt) |
| 141 | boost_asio = boost_cmake.dependency('boost_asio').as_system() |
| 142 | boost_bimap = boost_cmake.dependency('boost_bimap').as_system() |
| 143 | boost_callable_traits = boost_cmake.dependency('boost_callable_traits').as_system() |
| 144 | boost_context = boost_cmake.dependency('boost_context').as_system() |
| 145 | boost_coroutine = boost_cmake.dependency('boost_coroutine').as_system() |
| 146 | boost_interprocess = boost_cmake.dependency('boost_interprocess').as_system() |
| 147 | boost_multiprecision = boost_cmake.dependency('boost_multiprecision').as_system() |
| 148 | boost_process = boost_cmake.dependency('boost_process').as_system() |
| 149 | boost = [ |
| 150 | boost_asio, |
| 151 | boost_bimap, |
| 152 | boost_callable_traits, |
| 153 | boost_context, |
| 154 | boost_coroutine, |
| 155 | boost_interprocess, |
| 156 | boost_multiprecision, |
| 157 | boost_process, |
| 158 | ] |
Konstantin Aladyshev | e11895f | 2024-04-04 12:35:33 +0300 | [diff] [blame] | 159 | endif |
| 160 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 161 | phosphor_logging_dep = dependency('phosphor-logging') |
| 162 | phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') |
| 163 | sdeventplus_dep = dependency('sdeventplus') |
Patrick Williams | f62ad6f | 2024-09-03 16:15:14 -0400 | [diff] [blame] | 164 | libsystemd_dep = dependency('libsystemd') |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 165 | crypto = dependency('libcrypto', version: '>=1.0.2g') |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 166 | pam = cpp.find_library('pam', required: true) |
Patrick Williams | 422385d | 2022-06-16 11:47:40 -0500 | [diff] [blame] | 167 | sdbusplus_dep = dependency('sdbusplus') |
William A. Kennington III | 7a3831b | 2023-06-21 01:10:49 -0700 | [diff] [blame] | 168 | stdplus_dep = dependency('stdplus') |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 169 | |
Patrick Williams | e5fa659 | 2023-12-07 14:47:50 -0600 | [diff] [blame] | 170 | nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system') |
Patrick Williams | c8fc728 | 2022-06-16 11:58:53 -0500 | [diff] [blame] | 171 | |
Patrick Williams | b69b206 | 2022-07-25 09:40:49 -0500 | [diff] [blame] | 172 | generated_src = [] |
| 173 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 174 | # Subfolders |
| 175 | subdir('libipmid') |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 176 | subdir('include') |
| 177 | subdir('user_channel') |
| 178 | subdir('scripts') |
| 179 | |
Patrick Williams | ed7dbef | 2025-02-07 10:54:37 -0500 | [diff] [blame] | 180 | if get_option('softoff').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 181 | subdir('xyz/openbmc_project/Ipmi/Internal/SoftPowerOff') |
| 182 | subdir('softoff') |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 183 | endif |
| 184 | |
| 185 | # whitelist |
Patrick Williams | ed7dbef | 2025-02-07 10:54:37 -0500 | [diff] [blame] | 186 | if get_option('ipmi-whitelist').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 187 | generate_whitelist_script = files('generate_whitelist_create.sh') |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 188 | |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 189 | whitelist_conf = get_option('whitelist-conf') |
| 190 | ipmiwhitelist = run_command( \ |
| 191 | 'bash', \ |
| 192 | generate_whitelist_script, \ |
| 193 | whitelist_conf, |
| 194 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 195 | |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 196 | whitelist_pre = declare_dependency( |
| 197 | include_directories: root_inc, |
| 198 | dependencies: [ |
| 199 | crypto, |
| 200 | ipmid_dep, |
| 201 | phosphor_dbus_interfaces_dep, |
| 202 | phosphor_logging_dep, |
| 203 | sdbusplus_dep, |
| 204 | ], |
| 205 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 206 | |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 207 | whitelist_lib = library( |
| 208 | 'whitelist', |
| 209 | 'whitelist-filter.cpp', |
| 210 | 'ipmiwhitelist.cpp', |
| 211 | implicit_include_directories: false, |
| 212 | dependencies: whitelist_pre, |
| 213 | version: meson.project_version(), |
| 214 | override_options: ['b_lundef=false'], |
| 215 | install: true, |
| 216 | install_dir: get_option('libdir') / 'ipmid-providers', |
| 217 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 218 | endif |
| 219 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 220 | # libsysintfcmds |
| 221 | sysintfcmds_pre = declare_dependency( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 222 | include_directories: root_inc, |
| 223 | dependencies: [ |
| 224 | channellayer_dep, |
| 225 | crypto, |
| 226 | nlohmann_json_dep, |
| 227 | phosphor_dbus_interfaces_dep, |
| 228 | phosphor_logging_dep, |
| 229 | sdbusplus_dep, |
| 230 | ipmid_dep, |
| 231 | ], |
| 232 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 233 | |
Willy Tu | ba9bbb6 | 2022-06-01 03:41:15 -0700 | [diff] [blame] | 234 | sysintfcmds_lib = library( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 235 | 'sysintfcmds', |
| 236 | 'systemintfcmds.cpp', |
| 237 | 'host-interface.cpp', |
| 238 | implicit_include_directories: false, |
| 239 | dependencies: sysintfcmds_pre, |
| 240 | version: meson.project_version(), |
| 241 | override_options: ['b_lundef=false'], |
| 242 | install: true, |
| 243 | install_dir: get_option('libdir') / 'ipmid-providers', |
| 244 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 245 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 246 | # ipmid |
| 247 | ipmid_pre = [ |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 248 | sdbusplus_dep, |
| 249 | stdplus_dep, |
| 250 | phosphor_logging_dep, |
| 251 | phosphor_dbus_interfaces_dep, |
| 252 | boost, |
| 253 | crypto, |
| 254 | ipmid_dep, |
| 255 | channellayer_dep, |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 256 | ] |
| 257 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 258 | transportoem_src = [] |
Patrick Williams | ed7dbef | 2025-02-07 10:54:37 -0500 | [diff] [blame] | 259 | if get_option('transport-oem').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 260 | transportoem_src = ['transporthandler_oem.cpp'] |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 261 | endif |
| 262 | |
Thang Tran | 292c917 | 2023-06-26 10:03:04 +0700 | [diff] [blame] | 263 | storage_cmds_src = [] |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 264 | if get_option('dynamic-sensors').disabled() and not get_option( |
| 265 | 'dynamic-storages-only', |
| 266 | ).disabled() |
| 267 | storage_cmds_src = ['dbus-sdr/storagecommands.cpp', 'dbus-sdr/sdrutils.cpp'] |
Thang Tran | 292c917 | 2023-06-26 10:03:04 +0700 | [diff] [blame] | 268 | endif |
| 269 | |
Patrick Williams | 768730d | 2023-09-06 16:27:20 -0500 | [diff] [blame] | 270 | openpower_cmds_src = [] |
| 271 | if get_option('open-power').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 272 | openpower_cmds_src = ['storageaddsel.cpp'] |
Patrick Williams | 768730d | 2023-09-06 16:27:20 -0500 | [diff] [blame] | 273 | endif |
| 274 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 275 | libipmi20_src = [ |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 276 | 'app/channel.cpp', |
| 277 | 'app/watchdog.cpp', |
| 278 | 'app/watchdog_service.cpp', |
| 279 | 'apphandler.cpp', |
| 280 | 'sys_info_param.cpp', |
| 281 | 'sensorhandler.cpp', |
| 282 | 'storagehandler.cpp', |
| 283 | 'chassishandler.cpp', |
| 284 | 'dcmihandler.cpp', |
| 285 | 'ipmisensor.cpp', |
| 286 | 'transporthandler.cpp', |
| 287 | 'globalhandler.cpp', |
| 288 | 'groupext.cpp', |
| 289 | 'selutility.cpp', |
| 290 | 'ipmi_fru_info_area.cpp', |
| 291 | 'read_fru_data.cpp', |
| 292 | 'sensordatahandler.cpp', |
| 293 | 'user_channel/channelcommands.cpp', |
| 294 | generated_src, |
| 295 | transportoem_src, |
| 296 | storage_cmds_src, |
| 297 | openpower_cmds_src, |
| 298 | conf_h, |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 299 | ] |
| 300 | |
| 301 | ipmi20_lib = library( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 302 | 'ipmi20', |
| 303 | libipmi20_src, |
| 304 | dependencies: [ipmid_pre, nlohmann_json_dep], |
| 305 | include_directories: root_inc, |
| 306 | install: true, |
| 307 | install_dir: get_option('libdir') / 'ipmid-providers', |
| 308 | version: meson.project_version(), |
| 309 | override_options: ['b_lundef=false'], |
| 310 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 311 | |
| 312 | libipmi20_dep = declare_dependency( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 313 | dependencies: ipmid_pre, |
| 314 | include_directories: root_inc, |
| 315 | link_with: ipmi20_lib, |
| 316 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 317 | |
| 318 | # ipmid binary |
| 319 | executable( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 320 | 'ipmid', |
| 321 | 'ipmid-new.cpp', |
| 322 | 'host-cmd-manager.cpp', |
| 323 | 'settings.cpp', |
| 324 | implicit_include_directories: false, |
| 325 | dependencies: [libipmi20_dep], |
| 326 | include_directories: root_inc, |
| 327 | export_dynamic: true, |
| 328 | install: true, |
| 329 | install_dir: get_option('bindir'), |
| 330 | ) |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 331 | |
| 332 | # Dynamic Sensor Stack |
| 333 | subdir('dbus-sdr') |
| 334 | |
Patrick Williams | ed7dbef | 2025-02-07 10:54:37 -0500 | [diff] [blame] | 335 | if get_option('dynamic-sensors').disabled() or not get_option('tests').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 336 | library( |
| 337 | 'dynamiccmds', |
| 338 | dbus_sdr_src, |
| 339 | implicit_include_directories: false, |
| 340 | dependencies: dbus_sdr_pre, |
| 341 | version: meson.project_version(), |
| 342 | override_options: ['b_lundef=false'], |
| 343 | install: true, |
| 344 | install_dir: get_option('libdir') / 'ipmid-providers', |
| 345 | ) |
Willy Tu | 6eab420 | 2022-06-09 11:34:52 -0700 | [diff] [blame] | 346 | endif |
Willy Tu | ba9bbb6 | 2022-06-01 03:41:15 -0700 | [diff] [blame] | 347 | |
Patrick Williams | ed7dbef | 2025-02-07 10:54:37 -0500 | [diff] [blame] | 348 | if get_option('tests').allowed() |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 349 | subdir('test') |
John Chung | e2fae4b | 2024-11-13 18:10:31 -0600 | [diff] [blame] | 350 | subdir('transport/serialbridge') |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 351 | endif |
| 352 | |
| 353 | install_subdir( |
Patrick Williams | 62ce159 | 2025-02-03 14:12:56 -0500 | [diff] [blame] | 354 | 'user_channel', |
| 355 | install_dir: get_option('includedir'), |
| 356 | strip_directory: false, |
| 357 | exclude_files: '*.cpp', |
| 358 | ) |
John Chung | e2fae4b | 2024-11-13 18:10:31 -0600 | [diff] [blame] | 359 | |
| 360 | # HW Transport |
| 361 | subdir('transport') |