Newer
Older
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
# -*- mode: conf -*-
project('zero-pinyin-service', ['c', 'cpp'],
version: '0.1.0',
license: 'GPL',
default_options: [
'warning_level=2',
'werror=true',
'buildtype=release',
'strip=true',
'b_ndebug=if-release'])
# to create a debug build
# meson setup --buildtype debugoptimized build/
add_project_arguments(
'-Wno-unused-parameter',
'-Wno-missing-field-initializers',
language: ['c', 'cpp'])
add_project_arguments(
'-std=c11',
language: 'c')
add_project_arguments(
'-std=c++11',
'-DHAVE_LIBUUID',
language: 'cpp')
if get_option('buildtype').startswith('release')
add_project_arguments(
'-DG_DISABLE_ASSERT',
'-DG_DISABLE_CHECKS',
language: ['c', 'cpp'])
endif
glib = dependency('glib-2.0')
gio = dependency('gio-unix-2.0')
uuid = dependency('uuid')
shared_dep = [glib, gio, uuid]
src = ['../PinyinParser.cc', 'parse-pinyin.cpp', 'zero-pinyin-service.cc', 'main.c']
executable('main', src, dependencies: shared_dep)
test('zero-pinyin-service',
executable('parse-pinyin',
['../PinyinParser.cc', 'parse-pinyin.cpp', 'parse-pinyin-test.cpp'],
dependencies: shared_dep))