[gdk-pixbuf] build: Build the .rc file on Windows



commit c1a8ca5c6536246cb094a1d1eda149a3740e5521
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Aug 4 15:33:06 2017 +0800

    build: Build the .rc file on Windows
    
    Like the autotools and Visual Studio builds, include the .rc file in the
    main GDK-Pixbuf DLL so that people can determine its version info
    more easily.  Determine current - age as we did in the autotools builds.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785767

 gdk-pixbuf/meson.build |   12 ++++++++++++
 meson.build            |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index f15ad2b..209c2c4 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -43,6 +43,8 @@ gdkpixbuf_features_conf.set('GDK_PIXBUF_MAJOR', gdk_pixbuf_version_major)
 gdkpixbuf_features_conf.set('GDK_PIXBUF_MINOR', gdk_pixbuf_version_minor)
 gdkpixbuf_features_conf.set('GDK_PIXBUF_MICRO', gdk_pixbuf_version_micro)
 gdkpixbuf_features_conf.set('GDK_PIXBUF_VERSION', meson.project_version())
+gdkpixbuf_features_conf.set('GDK_PIXBUF_API_VERSION', gdk_pixbuf_api_version)
+gdkpixbuf_features_conf.set('LT_CURRENT_MINUS_AGE', current_minus_age)
 
 gdk_pixbuf_features_h = configure_file(input: 'gdk-pixbuf-features.h.in',
                                        output: 'gdk-pixbuf-features.h',
@@ -89,6 +91,16 @@ gdkpixbuf_enums = gnome.mkenums('gdk-pixbuf-enum-types',
                                 install_dir: join_paths(gdk_pixbuf_includedir, gdk_pixbuf_api_path))
 gdkpixbuf_enum_h = gdkpixbuf_enums[1]
 
+if host_system == 'windows'
+  gdk_pixbuf_win_rc = configure_file(
+    input: 'gdk_pixbuf.rc.in',
+    output: 'gdk_pixbuf.rc',
+    configuration: gdkpixbuf_features_conf,
+  )
+  gdk_pixbuf_win_res = import('windows').compile_resources(gdk_pixbuf_win_rc)
+  gdkpixbuf_sources += gdk_pixbuf_win_res
+endif
+
 # Check if we need to build loaders as built-in functionality
 included_loaders_cflags = []
 included_loaders_deps = []
diff --git a/meson.build b/meson.build
index 0db2c02..5f64f28 100644
--- a/meson.build
+++ b/meson.build
@@ -40,6 +40,8 @@ soversion = 0
 current = gdk_pixbuf_binary_age - gdk_pixbuf_interface_age
 revision = gdk_pixbuf_interface_age
 libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
+age = gdk_pixbuf_binary_age - gdk_pixbuf_interface_age
+current_minus_age = current - age
 
 # Paths
 gdk_pixbuf_prefix = get_option('prefix')


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