Skip to content

Commit 16c9bca

Browse files
committed
Merge branch 'mh/meson-credential-helpers' into seen
* mh/meson-credential-helpers: meson: wire up credential-libsecret meson: wire up credential-wincred
2 parents dac46d8 + 63c0a06 commit 16c9bca

File tree

6 files changed

+17
-0
lines changed

6 files changed

+17
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
glib = dependency('glib-2.0')
2+
libsecret = dependency('libsecret-1')
3+
executable('git-credential-libsecret', 'git-credential-libsecret.c', dependencies: [glib, libsecret])

contrib/credential/meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
if get_option('credential_wincred')
2+
subdir('wincred')
3+
endif
4+
if get_option('credential_libsecret')
5+
subdir('libsecret')
6+
endif

contrib/credential/wincred/git-credential-wincred.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
1414

15+
#ifndef _MSC_VER
1516
__attribute__((format (printf, 1, 2)))
17+
#endif
1618
static void die(const char *err, ...)
1719
{
1820
char msg[4096];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
executable('git-credential-wincred', 'git-credential-wincred.c')

contrib/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
foreach feature : get_option('contrib')
22
subdir(feature)
33
endforeach
4+
subdir('credential')

meson_options.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ option('version', type: 'string', value: '',
2929
# Features supported by Git.
3030
option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],
3131
description: 'Contributed features to include.')
32+
option('credential_libsecret', type: 'boolean', value: false,
33+
description: 'Build helper git-credential-libsecret. Requires GLib and libsecret.')
34+
option('credential_wincred', type: 'boolean', value: false,
35+
description: 'Build helper git-credential-wincred. Requires Windows SDK.')
3236
option('curl', type: 'feature', value: 'enabled',
3337
description: 'Build helpers used to access remotes with the HTTP transport.')
3438
option('expat', type: 'feature', value: 'enabled',

0 commit comments

Comments
 (0)