blob: 5f90ea5c53aba7ba482a4da354e74f5fdae3d339 [file] [log] [blame]
Patrick Williams43dc41f2023-04-04 20:54:54 -05001project(
2 'slpd-lite',
3 'cpp',
4 version: '0.1',
Patrick Williams77350e12023-07-12 11:16:12 -05005 meson_version: '>=1.1.1',
Patrick Williams43dc41f2023-04-04 20:54:54 -05006 default_options: [
7 'warning_level=3',
8 'werror=true',
Patrick Williams77350e12023-07-12 11:16:12 -05009 'cpp_std=c++23',
Patrick Williams43dc41f2023-04-04 20:54:54 -050010 ],
11)
12
13libsystemd_dep = dependency('libsystemd')
14
15executable(
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 Geissler0e948dc2024-05-23 09:51:48 -050026
27build_tests = get_option('tests')
28gtest = dependency('gtest', main: true, disabler: true, required: build_tests)
29gmock = 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 )
Andrew Geissler6f01edc2024-05-24 10:21:05 -050042
43 test(
44 'test_slp_message_handler',
45 executable('test_slp_message_handler',
46 './test/slp_message_handler_test.cpp',
47 'slp_parser.cpp',
48 'slp_message_handler.cpp',
49 dependencies: [
50 gtest,
51 ],
52 implicit_include_directories: true,
53 include_directories: '../'
54 )
55 )