[libgit2-glib] meson: Renamed `extra_args` to `cflags`



commit 2c762bb1ab3be8e5f94116faaf0f3bf7ef4207ae
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Mon Nov 12 12:34:40 2018 +0100

    meson: Renamed `extra_args` to `cflags`
    
    The `extra_args` variable has been renamed to the well known
    `cflags`, which is more widely used. Its definition has also been
    removed from the source root meson build file as it is only used
    in the `libgit2-glib` directory.

 libgit2-glib/meson.build | 12 +++++++-----
 meson.build              |  4 +---
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/libgit2-glib/meson.build b/libgit2-glib/meson.build
index f50d647..5810622 100644
--- a/libgit2-glib/meson.build
+++ b/libgit2-glib/meson.build
@@ -150,6 +150,8 @@ sources = [
   'ggit-utils.c',
 ]
 
+cflags = []
+
 if enable_ssh
   headers += ssh_headers
 
@@ -163,7 +165,7 @@ if enable_ssh
 #include <libgit2-glib/ggit-cred-ssh-interactive.h>
 '''
 
-  extra_args += ['-DGIT_SSH=1']
+  cflags += ['-DGIT_SSH=1']
 else
   private_headers += ssh_headers
 
@@ -211,13 +213,13 @@ endif
 
 libgit2_glib = shared_library(
   'git2-glib-@0@'.format(libgit2_glib_api_version),
-  include_directories: core_inc,
+  include_directories: top_inc,
   sources: sources + enum_types + private_headers,
   version: libversion,
   soversion: soversion,
   install: true,
   dependencies: platform_deps,
-  c_args: extra_args + ['-DG_LOG_DOMAIN="@0@"'.format(libgit2_glib_ns)],
+  c_args: cflags + ['-DG_LOG_DOMAIN="@0@"'.format(libgit2_glib_ns)],
   link_args: libgit2_glib_link_args,
 )
 
@@ -230,13 +232,13 @@ pkg.generate(
   subdirs: libgit2_glib_api_name,
   requires: ['libgit2 >= ' + git2_req, 'glib-2.0 >= ' + glib_req, 'gobject-2.0 >= ' + glib_req, 'gio-2.0 >= 
' + glib_req],
   variables: 'exec_prefix=${prefix}',
-  extra_cflags: extra_args,
+  extra_cflags: cflags,
 )
 
 # Internal dependency, for tests and benchmarks
 libgit2_glib_dep = declare_dependency(
   link_with: libgit2_glib,
-  include_directories: [core_inc, libgit2_glib_inc],
+  include_directories: [top_inc, libgit2_glib_inc],
   dependencies: platform_deps,
   # Everything that uses libgit2-glib needs this built to compile
   sources: enum_types[1],
diff --git a/meson.build b/meson.build
index 1965d14..13b6611 100644
--- a/meson.build
+++ b/meson.build
@@ -105,9 +105,7 @@ add_project_arguments(common_flags, language: 'c')
 # Termios
 have_termios = cc.has_header('termios.h')
 
-extra_args= []
-
-core_inc = include_directories('.')
+top_inc = include_directories('.')
 
 # Required dependencies
 git2_req = '0.25.0'


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