-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
29 lines (22 loc) · 960 Bytes
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
project('forti-api', 'cpp',
version : '0.2.0',
default_options : ['warning_level=3', 'cpp_std=c++23'])
source_root = meson.source_root()
json_dep = dependency('nlohmann_json', required: true)
libcurl_dep = dependency('libcurl', required: true)
gtest_dep = dependency('gtest', required: true, main: false)
global_deps = [json_dep, libcurl_dep]
test_deps = global_deps + gtest_dep
test_sources = []
foreach cpp_file : run_command('find', source_root + '/tests', '-type', 'f', '-name', '*.cpp', check: true).stdout().strip().split('\n')
test_sources += files(cpp_file)
endforeach
if get_option('buildtype') == 'debug'
# add_project_arguments('-DENABLE_DEBUG', language: 'cpp')
test('runTests', executable('runTests', test_sources, dependencies: test_deps))
executable('forti-api', 'main.cpp',
dependencies: global_deps,
include_directories: 'include',
install: false
)
endif