[libgit2-glib] build: include to build/install ssh sources



commit 06d6e3879bf0a3b82d130e7cf33884d354646e4c
Author: Igor Gnatenko <ignatenko src gnome org>
Date:   Fri Feb 17 11:02:05 2017 +0100

    build: include to build/install ssh sources
    
    Signed-off-by: Igor Gnatenko <ignatenko src gnome org>

 libgit2-glib/meson.build |   11 +++++++++++
 meson.build              |    8 +++++---
 2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/libgit2-glib/meson.build b/libgit2-glib/meson.build
index f7f7f44..47f0116 100644
--- a/libgit2-glib/meson.build
+++ b/libgit2-glib/meson.build
@@ -143,6 +143,17 @@ sources = [
   'ggit-utils.c',
 ]
 
+if enable_ssh
+  headers += [
+    'ggit-cred-ssh-interactive.h',
+    'ggit-cred-ssh-key-from-agent.h',
+  ]
+  sources += [
+    'ggit-cred-ssh-interactive.c',
+    'ggit-cred-ssh-key-from-agent.c',
+  ]
+endif
+
 configure_file(input : 'ggit.h.in',
                output : 'ggit.h',
                configuration : ggit_h_data,
diff --git a/meson.build b/meson.build
index 3c9a454..e5db495 100644
--- a/meson.build
+++ b/meson.build
@@ -182,8 +182,9 @@ ggit_h_data = configuration_data()
 ggit_h_data.set('GGIT_SSH_INCLUDES', '')
 
 # Check for libgit2 ssh support
-enable_ssh = get_option('enable-ssh')
-if enable_ssh != 'no'
+enable_ssh_opt = get_option('enable-ssh')
+enable_ssh = false
+if enable_ssh_opt != 'no'
   have_libgit2_ssh = cc.compiles('''
     #include <git2.h>
     int
@@ -195,7 +196,7 @@ if enable_ssh != 'no'
   ''',
   name: 'libgit2 supports SSH')
 
-  if enable_ssh == 'yes' and not have_libgit2_ssh
+  if enable_ssh_opt == 'yes' and not have_libgit2_ssh
     error('libgit2 ssh support was requested, but not found')
   endif
 
@@ -206,6 +207,7 @@ if enable_ssh != 'no'
 '''
     ggit_h_data.set('GGIT_SSH_INCLUDES', ssh_includes)
     extra_args += [ '-DGIT_SSH=1' ]
+    enable_ssh = true
   endif
 endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]