meson: Build .rc file on Windows
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 4 Aug 2017 08:44:52 +0000 (16:44 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 9 Aug 2017 07:39:12 +0000 (15:39 +0800)
Like the Visual Studio projects and autotools builds on Windows, include
the .rc file for Windows builds, so that people can see the version info
of the ATK DLL more easily.

https://bugzilla.gnome.org/show_bug.cgi?id=785802

atk/atk.rc.in
atk/meson.build

index 3bc0cb3..b572cca 100644 (file)
@@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
        VALUE "FileDescription", "atk"
        VALUE "FileVersion", "@ATK_VERSION@.0"
        VALUE "InternalName", "libatk-1.0-@LT_CURRENT_MINUS_AGE@"
-       VALUE "LegalCopyright", "Copyright © Sun Microsystems Inc."
+       VALUE "LegalCopyright", "Copyright Sun Microsystems Inc."
        VALUE "OriginalFilename", "libatk-1.0-@LT_CURRENT_MINUS_AGE@.dll"
        VALUE "ProductName", "atk"
        VALUE "ProductVersion", "@ATK_VERSION@"
index 014001a..b014009 100644 (file)
@@ -77,6 +77,7 @@ atk_version_conf.set('ATK_MINOR_VERSION', atk_minor_version)
 atk_version_conf.set('ATK_MICRO_VERSION', atk_micro_version)
 atk_version_conf.set('ATK_BINARY_AGE', atk_binary_age)
 atk_version_conf.set('ATK_INTERFACE_AGE', atk_interface_age)
+atk_version_conf.set('LT_CURRENT_MINUS_AGE', '0')
 
 atk_version_h = configure_file(input: 'atkversion.h.in',
                output: 'atkversion.h',
@@ -108,6 +109,16 @@ atk_cflags = [
   '-DATK_LOCALEDIR="@0@"'.format(join_paths(atk_datadir, 'locale')),
 ]
 
+if host_system == 'windows'
+  atk_win_rc = configure_file(
+    input: 'atk.rc.in',
+    output: 'atk.rc',
+    configuration: atk_version_conf,
+  )
+  atk_win_res = import('windows').compile_resources(atk_win_rc)
+  atk_sources += atk_win_res
+endif
+
 atk_inc = include_directories('.')
 
 libatk = shared_library('atk-@0@'.format(atk_api_version),