summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-08-04 15:33:06 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-08-17 15:14:54 +0800
commitc1a8ca5c6536246cb094a1d1eda149a3740e5521 (patch)
tree03235d2a4bc144ff582b9f01eac013659f9fa18a
parent480e4834115a10b3f81615527803c5601ff18c77 (diff)
downloadgdk-pixbuf-c1a8ca5c6536246cb094a1d1eda149a3740e5521.tar.gz
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
-rw-r--r--gdk-pixbuf/meson.build12
-rw-r--r--meson.build2
2 files changed, 14 insertions, 0 deletions
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index f15ad2bdb..209c2c45f 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 0db2c02db..5f64f2877 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')