forked from mamba-org/libcred
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
63 lines (51 loc) · 1.99 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
project(
'libcred', 'cpp',
version : '0.1.0',
meson_version : '>=0.53.0',
default_options : []
)
so_version = '1'
if host_machine.system() == 'darwin'
impl_sources = ['src/libcred_macos.cpp']
apple_deps = dependency('appleframeworks', modules : ['CoreFoundation', 'Security'])
credhelperlib = library('cred',
impl_sources,
c_args: [],
include_directories: 'include',
dependencies: [apple_deps],
install: true,
version: meson.project_version(),
soversion: so_version
)
endif
if host_machine.system() == 'linux'
impl_sources = ['src/libcred_linux.cpp']
libsecret_dep = dependency('libsecret-1')
glib_dep = dependency('glib-2.0')
credhelperlib = library('cred',
impl_sources,
c_args: [],
include_directories: 'include',
dependencies: [libsecret_dep, glib_dep],
install: true,
version: meson.project_version(),
soversion: so_version
)
endif
if host_machine.system() == 'windows'
impl_sources = ['src/libcred_win.cpp']
credhelperlib = shared_library('cred',
impl_sources,
cpp_args: ['-DLIBCRED_EXPORTS=1'],
include_directories: 'include',
dependencies: [],
install: true,
version: meson.project_version(),
soversion: so_version
)
endif
install_headers('include/libcred.hpp')
executable('ex1', ['example/ex1.cpp'], link_with: credhelperlib, include_directories: ['include'])
executable('ex2', ['example/ex2.cpp'], link_with: credhelperlib, include_directories: ['include'])
testexe = executable('testexe', ['test/test.cpp'], link_with: credhelperlib, include_directories: ['include'])
test('test1', testexe)