[gtk/gtk-2-24] MSVC builds: Improve pkg-config files generation



commit 0b7ee9880aac06aaaef3a705b51840dd20728931
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Dec 21 13:22:19 2018 +0800

    MSVC builds: Improve pkg-config files generation
    
    Just link to Cairo instead of looking for the Cairo .pc file as the
    Cairo build system for Visual Studio currently does not generate a
    pkg-config file for us.  This will eliminate the need to hand-craft a
    pkg-config file for Cairo to be able to use the pkg-config files that we
    generate here.

 build/win32/gtkpc.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/build/win32/gtkpc.py b/build/win32/gtkpc.py
index f13321459d..2c960c8b82 100644
--- a/build/win32/gtkpc.py
+++ b/build/win32/gtkpc.py
@@ -24,9 +24,9 @@ def main(argv):
     base_pc.setup(argv, gdk_parser)
 
     atk_min_ver = '1.29.2'
-    cairo_min_ver = '1.6'
     gdk_pixbuf_min_ver = '2.21.0'
     gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -lwinmm'
+    gdk_additional_libs = '-lcairo'
     glib_min_ver = '2.28.0'
 
     cairo_backends = 'cairo-win32'
@@ -38,14 +38,13 @@ def main(argv):
     pkg_replace_items = {'@GTK_API_VERSION@': '2.0',
                          '@gdktarget@': gdktarget}
 
-    pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver + ' ' + \
-                            'cairo >= ' + cairo_min_ver + ' '
+    pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver + ' '
 
     gdk_pc_replace_items = {'@GDK_PACKAGES@': gio_package + ' ' + \
                                               'pangowin32 pangocairo' + ' ' + \
                                               pkg_required_packages,
                             '@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
-                            '@GDK_EXTRA_LIBS@': gdk_win32_sys_libs,
+                            '@GDK_EXTRA_LIBS@': gdk_additional_libs + ' ' + gdk_win32_sys_libs,
                             '@GDK_EXTRA_CFLAGS@': ''}
 
     gtk_pc_replace_items = {'@host@': gdk_args.host,
@@ -55,7 +54,7 @@ def main(argv):
                                               gio_package,
                             '@GTK_PRIVATE_PACKAGES@': 'atk',
                             '@GTK_EXTRA_CFLAGS@': '',
-                            '@GTK_EXTRA_LIBS@': '',
+                            '@GTK_EXTRA_LIBS@': ' ' + gdk_additional_libs,
                             '@GTK_EXTRA_CFLAGS@': ''}
 
     pkg_replace_items.update(base_pc.base_replace_items)


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