-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
48 lines (39 loc) · 1.52 KB
/
meson.build
File metadata and controls
48 lines (39 loc) · 1.52 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
project('serpapi', 'cpp',
version : '0.3.0',
default_options : ['warning_level=3', 'cpp_std=c++17'])
compiler = meson.get_compiler('cpp')
add_project_arguments(['-Wno-deprecated-declarations', '-funsigned-char'], language : 'cpp')
incdirs = include_directories('src')
libserpapi = library('serpapi',
[
'src/serpapi.cpp',
'src/callback.cpp'
],
dependencies : [
dependency('libcurl'),
dependency('RapidJSON')
],
include_directories : incdirs,
install : true)
install_headers('src/serpapi.hpp', 'src/callback.hpp', subdir : 'serpapi')
pkg = import('pkgconfig')
pkg.generate(libserpapi,
description : 'C++ library for SerpApi',
version : meson.project_version(),
name : 'serpapi',
requires : ['libcurl', 'RapidJSON'],
subdirs : 'serpapi')
libserpapi_dep = declare_dependency(include_directories : incdirs, link_with : libserpapi)
subdir('oobt')
subdir('example')
# Configure the testing setup
test_src = files('test/test_main.cpp', 'test/test_serpapi.cpp')
test_deps = [
# dependency('libcurl'),
dependency('RapidJSON'),
libserpapi_dep,
dependency('gtest')
]
test_args = ['-Wno-missing-field-initializers','-g','-lgtest']
e = executable('test_compiled', test_src, dependencies : test_deps)
test('gtest', e, protocol : 'gtest')