mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 04:36:17 +01:00
meson: build Windows resource files
configure_file() forces utf-8 atm but .rc files are not utf-8. To work around the issue just remove the only non-ASCII char. https://bugzilla.gnome.org/show_bug.cgi?id=784995
This commit is contained in:
parent
0e7b82abb9
commit
aa7c5cbdcb
@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
|
||||
VALUE "FileDescription", "Gio"
|
||||
VALUE "FileVersion", "@GLIB_VERSION@.0"
|
||||
VALUE "InternalName", "libgio-2.0-@LT_CURRENT_MINUS_AGE@"
|
||||
VALUE "LegalCopyright", "Copyright © 2006-2011 Red Hat, Inc. and others."
|
||||
VALUE "LegalCopyright", "Copyright 2006-2011 Red Hat, Inc. and others."
|
||||
VALUE "OriginalFilename", "libgio-2.0-@LT_CURRENT_MINUS_AGE@.dll"
|
||||
VALUE "ProductName", "GLib"
|
||||
VALUE "ProductVersion", "@GLIB_VERSION@"
|
||||
|
@ -390,6 +390,14 @@ else
|
||||
'gwin32outputstream.c',
|
||||
)
|
||||
|
||||
gio_win_rc = configure_file(
|
||||
input: 'gio.rc.in',
|
||||
output: 'gio.rc',
|
||||
configuration: glibconfig_conf,
|
||||
)
|
||||
gio_win_res = windows.compile_resources(gio_win_rc)
|
||||
win32_sources += [gio_win_res]
|
||||
|
||||
gio_win32_include_headers = files(
|
||||
'gwin32inputstream.h',
|
||||
'gwin32outputstream.h',
|
||||
@ -529,14 +537,6 @@ gio_sources += portal_sources
|
||||
gio_sources += local_sources
|
||||
|
||||
MISSING_STUFF = '''
|
||||
if OS_WIN32_AND_DLL_COMPILATION
|
||||
gio_win32_res = gio-win32-res.o
|
||||
gio_win32_res_ldflag = -Wl,$(gio_win32_res)
|
||||
endif
|
||||
|
||||
gio-win32-res.o: gio.rc
|
||||
'$(WINDRES) gio.rc $@
|
||||
|
||||
# This is read by gobject-introspection/misc/ and gtk-doc
|
||||
gio-public-headers.txt: Makefile
|
||||
'$(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
|
||||
|
@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
|
||||
VALUE "FileDescription", "GLib"
|
||||
VALUE "FileVersion", "@GLIB_VERSION@.0"
|
||||
VALUE "InternalName", "libglib-2.0-@LT_CURRENT_MINUS_AGE@"
|
||||
VALUE "LegalCopyright", "Copyright © 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald and others."
|
||||
VALUE "LegalCopyright", "Copyright 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald and others."
|
||||
VALUE "OriginalFilename", "libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll"
|
||||
VALUE "ProductName", "GLib"
|
||||
VALUE "ProductVersion", "@GLIB_VERSION@"
|
||||
|
@ -197,6 +197,13 @@ glib_sources = files(
|
||||
)
|
||||
|
||||
if host_system == 'windows'
|
||||
glib_win_rc = configure_file(
|
||||
input: 'glib.rc.in',
|
||||
output: 'glib.rc',
|
||||
configuration: glibconfig_conf,
|
||||
)
|
||||
glib_win_res = windows.compile_resources(glib_win_rc)
|
||||
glib_sources += [glib_win_res]
|
||||
glib_sources += files('gthread-win32.c')
|
||||
glib_sources += files('gwin32.c', 'gspawn-win32.c', 'giowin32.c')
|
||||
platform_deps = [winsock2, cc.find_library('winmm')]
|
||||
|
@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
|
||||
VALUE "FileDescription", "GModule"
|
||||
VALUE "FileVersion", "@GLIB_VERSION@.0"
|
||||
VALUE "InternalName", "libgmodule-2.0-@LT_CURRENT_MINUS_AGE@"
|
||||
VALUE "LegalCopyright", "Copyright © 1998-2011 Tim Janik and others."
|
||||
VALUE "LegalCopyright", "Copyright 1998-2011 Tim Janik and others."
|
||||
VALUE "OriginalFilename", "libgmodule-2.0-@LT_CURRENT_MINUS_AGE@.dll"
|
||||
VALUE "ProductName", "GLib"
|
||||
VALUE "ProductVersion", "@GLIB_VERSION@"
|
||||
|
@ -84,8 +84,19 @@ gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in',
|
||||
|
||||
install_headers(['gmodule.h'], subdir : 'glib-2.0')
|
||||
|
||||
gmodule_sources = ['gmodule.c']
|
||||
if host_system == 'windows'
|
||||
gmodule_win_rc = configure_file(
|
||||
input: 'gmodule.rc.in',
|
||||
output: 'gmodule.rc',
|
||||
configuration: glibconfig_conf,
|
||||
)
|
||||
gmodule_win_res = windows.compile_resources(gmodule_win_rc)
|
||||
gmodule_sources += [gmodule_win_res]
|
||||
endif
|
||||
|
||||
libgmodule = shared_library('gmodule-2.0',
|
||||
sources : ['gmodule.c'],
|
||||
sources : gmodule_sources,
|
||||
version : library_version,
|
||||
soversion : soversion,
|
||||
install : true,
|
||||
|
@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
|
||||
VALUE "FileDescription", "GObject"
|
||||
VALUE "FileVersion", "@GLIB_VERSION@.0"
|
||||
VALUE "InternalName", "libgobject-2.0-@LT_CURRENT_MINUS_AGE@"
|
||||
VALUE "LegalCopyright", "Copyright © 1998-2011 Tim Janik, Red Hat, Inc. and others"
|
||||
VALUE "LegalCopyright", "Copyright 1998-2011 Tim Janik, Red Hat, Inc. and others"
|
||||
VALUE "OriginalFilename", "libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll"
|
||||
VALUE "ProductName", "GLib"
|
||||
VALUE "ProductVersion", "@GLIB_VERSION@"
|
||||
|
@ -43,6 +43,16 @@ gobject_sources = files(
|
||||
'gvaluetypes.c',
|
||||
)
|
||||
|
||||
if host_system == 'windows'
|
||||
gobject_win_rc = configure_file(
|
||||
input: 'gobject.rc.in',
|
||||
output: 'gobject.rc',
|
||||
configuration: glibconfig_conf,
|
||||
)
|
||||
gobject_win_res = windows.compile_resources(gobject_win_rc)
|
||||
gobject_sources += [gobject_win_res]
|
||||
endif
|
||||
|
||||
if enable_dtrace
|
||||
gobject_dtrace_obj = dtrace_obj_gen.process('gobject_probes.d')
|
||||
gobject_dtrace_hdr = dtrace_hdr_gen.process('gobject_probes.d')
|
||||
|
@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
|
||||
VALUE "FileDescription", "GThread"
|
||||
VALUE "FileVersion", "@GLIB_VERSION@.0"
|
||||
VALUE "InternalName", "libgthread-2.0-@LT_CURRENT_MINUS_AGE@"
|
||||
VALUE "LegalCopyright", "Copyright © 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald, Sebastian Wilhelmi and others."
|
||||
VALUE "LegalCopyright", "Copyright 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald, Sebastian Wilhelmi and others."
|
||||
VALUE "OriginalFilename", "libgthread-2.0-@LT_CURRENT_MINUS_AGE@.dll"
|
||||
VALUE "ProductName", "GLib"
|
||||
VALUE "ProductVersion", "@GLIB_VERSION@"
|
||||
|
@ -1,7 +1,19 @@
|
||||
# Just a skeleton lib for backwards compatibility since all the functionaliy
|
||||
# has been moved into glib now
|
||||
|
||||
gthread_sources = ['gthread-impl.c']
|
||||
if host_system == 'windows'
|
||||
gthread_win_rc = configure_file(
|
||||
input: 'gthread.rc.in',
|
||||
output: 'gthread.rc',
|
||||
configuration: glibconfig_conf,
|
||||
)
|
||||
gthread_win_res = windows.compile_resources(gthread_win_rc)
|
||||
gthread_sources += [gthread_win_res]
|
||||
endif
|
||||
|
||||
libgthread = shared_library('gthread-2.0',
|
||||
sources : [ 'gthread-impl.c' ],
|
||||
sources : gthread_sources,
|
||||
version : library_version,
|
||||
soversion : soversion,
|
||||
install : true,
|
||||
|
@ -1073,6 +1073,7 @@ glibconfig_conf.set('g_module_suffix', g_module_suffix)
|
||||
glibconfig_conf.set('GLIB_MAJOR_VERSION', major_version)
|
||||
glibconfig_conf.set('GLIB_MINOR_VERSION', minor_version)
|
||||
glibconfig_conf.set('GLIB_MICRO_VERSION', micro_version)
|
||||
glibconfig_conf.set('GLIB_VERSION', glib_version)
|
||||
|
||||
glibconfig_conf.set('glib_void_p', voidp_size)
|
||||
glibconfig_conf.set('glib_long', long_size)
|
||||
@ -1645,6 +1646,7 @@ if want_systemtap and enable_dtrace
|
||||
endif
|
||||
|
||||
|
||||
windows = import('windows')
|
||||
subdir('glib')
|
||||
subdir('gobject')
|
||||
subdir('gthread')
|
||||
|
Loading…
Reference in New Issue
Block a user