gtestutils: Fix a typo in a documentation comment
[glib.git] / win32 / glibpc.py
blobb04dc24336e7f303ffd6b4253f3bb468675b1546
1 #!/usr/bin/python
3 # Utility script to generate .pc files for GLib
4 # for Visual Studio builds, to be used for
5 # building introspection files
7 # Author: Fan, Chun-wei
8 # Date: March 10, 2016
10 import os
11 import sys
13 from replace import replace_multi
14 from pc_base import BasePCItems
16 def main(argv):
17 base_pc = BasePCItems()
19 base_pc.setup(argv)
20 pkg_replace_items = {'@G_THREAD_CFLAGS@': '',
21 '@G_THREAD_LIBS@': '',
22 '@CARBON_LIBS@': '',
23 '@COCOA_LIBS@': ''}
25 glib_replace_items = {'glib-genmarshal': '${exec_prefix}/bin/glib-genmarshal',
26 'glib-mkenums': 'perl ${exec_prefix}/bin/glib-mkenums',
27 'gobject-query': '${exec_prefix}/bin/gobject-query',
28 '@PCRE_REQUIRES@': '',
29 '@INTLLIBS@': '-lintl',
30 '@G_LIBS_EXTRA@': '',
31 '@PCRE_LIBS@': '',
32 '@ICONV_LIBS@': '-liconv',
33 '@GLIB_EXTRA_CFLAGS@': ''}
35 pkg_replace_items.update(base_pc.base_replace_items)
37 glib_replace_items.update(pkg_replace_items)
39 # Generate glib-2.0.pc
40 replace_multi(base_pc.top_srcdir + '/glib-2.0.pc.in',
41 base_pc.srcdir + '/glib-2.0.pc',
42 glib_replace_items)
44 # Generate gthread-2.0.pc
45 replace_multi(base_pc.top_srcdir + '/gthread-2.0.pc.in',
46 base_pc.srcdir + '/gthread-2.0.pc',
47 pkg_replace_items)
49 # Generate gmodule*-2.0.pc
50 gmodule_replace_items = {'@G_MODULE_SUPPORTED@': 'yes',
51 '@G_MODULE_LDFLAGS@': '',
52 '@G_MODULE_LIBS@': ''}
53 gmodule_replace_items.update(pkg_replace_items)
54 replace_multi(base_pc.top_srcdir + '/gmodule-2.0.pc.in',
55 base_pc.srcdir + '/gmodule-2.0.pc',
56 gmodule_replace_items)
57 replace_multi(base_pc.top_srcdir + '/gmodule-export-2.0.pc.in',
58 base_pc.srcdir + '/gmodule-export-2.0.pc',
59 gmodule_replace_items)
60 replace_multi(base_pc.top_srcdir + '/gmodule-no-export-2.0.pc.in',
61 base_pc.srcdir + '/gmodule-no-export-2.0.pc',
62 gmodule_replace_items)
64 # Generate gobject-2.0.pc
65 gobject_replace_items = {'@LIBFFI_LIBS@': ''}
66 gobject_replace_items.update(pkg_replace_items)
67 replace_multi(base_pc.top_srcdir + '/gobject-2.0.pc.in',
68 base_pc.srcdir + '/gobject-2.0.pc',
69 gobject_replace_items)
71 # Generate gio*-2.0.pc
72 gio_replace_items = {'@GIO_MODULE_DIR@': '${exec_prefix}/bin/gio/modules',
73 '@ZLIB_LIBS@': '-lzlib1',
74 '@NETWORK_LIBS@': '-lws2_32',
75 '@SELINUX_LIBS@': '',
76 '@LIBMOUNT_LIBS@': '',
77 'glib-compile-schemas': '${exec_prefix}/bin/glib-compile-schemas',
78 'glib-compile-resources': '${exec_prefix}/bin/glib-compile-resources',
79 'gdbus-codegen': 'python ${exec_prefix}/bin/gdbus-codegen'}
80 gio_replace_items.update(pkg_replace_items)
81 replace_multi(base_pc.top_srcdir + '/gio-2.0.pc.in',
82 base_pc.srcdir + '/gio-2.0.pc',
83 gio_replace_items)
84 replace_multi(base_pc.top_srcdir + '/gio-windows-2.0.pc.in',
85 base_pc.srcdir + '/gio-windows-2.0.pc',
86 pkg_replace_items)
88 if __name__ == '__main__':
89 sys.exit(main(sys.argv))