[gtk/gtk-3-24] meson.build: Fix Visual Studio builds



commit f5408e5061fc09a55a5c70fcdc02166797f7288e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Apr 12 11:29:52 2019 +0800

    meson.build: Fix Visual Studio builds
    
    Commits a04fef4 and cc7f9c4 inadvertedly broke Visual Studio builds as
    it caused the following to show up when configuring:
    
    gdk\meson.build:281:0: ERROR: Invalid Shared library version "vs9.2404.4". Must be of the form X.Y.Z 
where all three are numbers. Y and Z are optional.
    
    Since we do not set a library version that mingles with the minor and
    micro versions, along with libtool current for any Visual Studio builds,
    just set those versions as 3 on Visual Studio builds, and things should
    work the way they did before.

 meson.build | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index eeeaea4d5a..5dcea9926c 100644
--- a/meson.build
+++ b/meson.build
@@ -110,8 +110,16 @@ endif
 
 # Maintain compatibility with the Autotools build
 current = gtk_binary_age - gtk_interface_age
-gtk_library_version = '@0@.@1@.@2@'.format(gtk_soversion, current, gtk_interface_age)
-gail_library_version = '0.0.0'
+
+gtk_library_version = ''
+gail_library_version = ''
+if cc.get_id() == 'msvc'
+  gtk_library_version = '3'
+  gail_library_version = '3'
+else
+  gtk_library_version = '@0@.@1@.@2@'.format(gtk_soversion, current, gtk_interface_age)
+  gail_library_version = '0.0.0'
+endif
 
 gtk_osxversions = [(100 * gtk_minor_version) + 1, '@0@.@1@.0'.format((100 * gtk_minor_version) + 1, 
gtk_micro_version)]
 


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