1project( 2 'phosphor-gpio-monitor', 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: '1.0', 11) 12 13build_tests = get_option('tests') 14 15cppfs = meson.get_compiler('cpp').find_library('stdc++fs') 16libevdev = dependency('libevdev') 17libsystemd = dependency('libsystemd') 18phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces') 19phosphor_logging = dependency('phosphor-logging') 20sdbusplus = dependency('sdbusplus') 21systemd = dependency('systemd') 22 23systemd_system_unit_dir = systemd.get_pkgconfig_variable( 24 'systemdsystemunitdir', 25 define_variable: ['prefix', get_option('prefix')]) 26 27configure_file( 28 copy: true, 29 input: 'phosphor-gpio-monitor@.service', 30 install: true, 31 install_dir: systemd_system_unit_dir, 32 output: 'phosphor-gpio-monitor@.service' 33) 34 35configure_file( 36 copy: true, 37 input: 'phosphor-gpio-presence@.service', 38 install: true, 39 install_dir: systemd_system_unit_dir, 40 output: 'phosphor-gpio-presence@.service' 41) 42 43libevdev_o = static_library( 44 'libevdev_o', 45 'evdev.cpp', 46 dependencies: [ 47 libevdev, 48 phosphor_dbus_interfaces, 49 phosphor_logging, 50 sdbusplus, 51 ] 52) 53 54libmonitor_o = static_library( 55 'libmonitor_o', 56 'monitor.cpp', 57 dependencies: [ 58 libevdev, 59 libsystemd, 60 phosphor_logging, 61 ], 62 link_with: [ 63 libevdev_o, 64 ], 65) 66 67phosphor_gpio_monitor = executable( 68 'phosphor-gpio-monitor', 69 'argument.cpp', 70 'mainapp.cpp', 71 dependencies: [ 72 libevdev, 73 libsystemd, 74 phosphor_logging, 75 ], 76 install: true, 77 link_with: [ 78 libevdev_o, 79 libmonitor_o, 80 ], 81) 82 83subdir('gpio-util') 84subdir('presence') 85subdir('test') 86