Patrick Williams | 43dc41f | 2023-04-04 20:54:54 -0500 | [diff] [blame] | 1 | project( |
| 2 | 'slpd-lite', |
| 3 | 'cpp', |
| 4 | version: '0.1', |
Patrick Williams | 77350e1 | 2023-07-12 11:16:12 -0500 | [diff] [blame] | 5 | meson_version: '>=1.1.1', |
Patrick Williams | 43dc41f | 2023-04-04 20:54:54 -0500 | [diff] [blame] | 6 | default_options: [ |
| 7 | 'warning_level=3', |
| 8 | 'werror=true', |
Patrick Williams | 77350e1 | 2023-07-12 11:16:12 -0500 | [diff] [blame] | 9 | 'cpp_std=c++23', |
Patrick Williams | 43dc41f | 2023-04-04 20:54:54 -0500 | [diff] [blame] | 10 | ], |
| 11 | ) |
| 12 | |
| 13 | libsystemd_dep = dependency('libsystemd') |
| 14 | |
| 15 | executable( |
| 16 | 'slpd', |
| 17 | 'main.cpp', |
| 18 | 'slp_message_handler.cpp', |
| 19 | 'slp_parser.cpp', |
| 20 | 'slp_server.cpp', |
| 21 | 'sock_channel.cpp', |
| 22 | dependencies: [ libsystemd_dep ], |
| 23 | install: true, |
| 24 | install_dir: get_option('sbindir'), |
| 25 | ) |
Andrew Geissler | 0e948dc | 2024-05-23 09:51:48 -0500 | [diff] [blame] | 26 | |
| 27 | build_tests = get_option('tests') |
| 28 | gtest = dependency('gtest', main: true, disabler: true, required: build_tests) |
| 29 | gmock = dependency('gmock', disabler: true, required: build_tests) |
| 30 | test( |
| 31 | 'test_slp_parser', |
| 32 | executable('test_slp_parser', |
| 33 | './test/slp_parser_test.cpp', |
| 34 | 'slp_parser.cpp', |
| 35 | dependencies: [ |
| 36 | gtest, |
| 37 | ], |
| 38 | implicit_include_directories: true, |
| 39 | include_directories: '../' |
| 40 | ) |
| 41 | ) |