[libgit2-glib] meson: Add or ignore SSH headers depending on the SSH option



commit baf9dae4d4f09612d666a87680083510c5c152e8
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Tue Feb 6 21:19:30 2018 +0100

    meson: Add or ignore SSH headers depending on the SSH option
    
    SSH headers are always included when generating documentation with
    GtkDoc even if SSH support is disabled.
    
    This patch adds SSH headers to the public headers if SSH is
    enabled or to the private headers if is disabled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792699

 libgit2-glib/meson.build |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/libgit2-glib/meson.build b/libgit2-glib/meson.build
index d51fd9f..bab4f61 100644
--- a/libgit2-glib/meson.build
+++ b/libgit2-glib/meson.build
@@ -74,6 +74,11 @@ private_headers = [
   'ggit-utils.h',
 ]
 
+ssh_headers = [
+  'ggit-cred-ssh-interactive.h',
+  'ggit-cred-ssh-key-from-agent.h',
+]
+
 sources = [
   'ggit-annotated-commit.c',
   'ggit-blame.c',
@@ -146,17 +151,13 @@ sources = [
 ]
 
 if enable_ssh
-  headers += [
-    'ggit-cred-ssh-interactive.h',
-    'ggit-cred-ssh-key-from-agent.h',
-  ]
+  headers += ssh_headers
+
   sources += [
     'ggit-cred-ssh-interactive.c',
     'ggit-cred-ssh-key-from-agent.c',
   ]
-endif
 
-if enable_ssh
   ssh_includes = '''
 #include <libgit2-glib/ggit-cred-ssh-key-from-agent.h>
 #include <libgit2-glib/ggit-cred-ssh-interactive.h>
@@ -164,6 +165,8 @@ if enable_ssh
 
   extra_args += [ '-DGIT_SSH=1' ]
 else
+  private_headers += ssh_headers
+
   ssh_includes = ''
 endif
 


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