[shotwell/shotwell-0.30] Only use version.h where we use the git macro



commit d757a73697afce46162086bfdfce2ef5693c5c03
Author: Jens Georg <mail jensge org>
Date:   Mon Oct 8 20:56:01 2018 +0200

    Only use version.h where we use the git macro

 meson.build        | 2 +-
 src/Resources.vala | 1 -
 src/meson.build    | 1 +
 vapi/version.vapi  | 3 +++
 4 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 42104ea4..26f6999c 100644
--- a/meson.build
+++ b/meson.build
@@ -21,7 +21,7 @@ shotwell_plugin_dir = join_paths(get_option('libdir'), 'shotwell', 'plugins', 'b
 
 add_global_arguments(['-DHAVE_CONFIG_H=1'],
                      ['-include'], ['config.h'],
-                     ['-include'], ['version.h'], language : 'c')
+                     language : 'c')
 add_global_arguments(['--target-glib=2.40',
                       '--vapidir=@0@'.format(join_paths(meson.current_source_dir(),
                         'vapi')),
diff --git a/src/Resources.vala b/src/Resources.vala
index 1449bf4e..9aa3992f 100644
--- a/src/Resources.vala
+++ b/src/Resources.vala
@@ -10,7 +10,6 @@ extern const string _VERSION;
 extern const string GETTEXT_PACKAGE;
 extern const string _LIB;
 extern const string _LIBEXECDIR;
-extern const string? _GIT_VERSION;
 
 namespace Resources {
     public const string APP_TITLE = "Shotwell";
diff --git a/src/meson.build b/src/meson.build
index d8d97ac6..530d6aff 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -245,6 +245,7 @@ executable('shotwell',
            vala_args : ['--pkg', 'libgphoto2',
                         '--pkg', 'libraw',
                         '--pkg', 'libexif',
+                        '--pkg', 'version',
                         '--gresources',
                         join_paths(meson.source_root(),
                           'org.gnome.Shotwell.gresource.xml')
diff --git a/vapi/version.vapi b/vapi/version.vapi
new file mode 100644
index 00000000..06974c84
--- /dev/null
+++ b/vapi/version.vapi
@@ -0,0 +1,3 @@
+[CCode (cheader_filename="version.h")]
+extern const string? _GIT_VERSION;
+


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