mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
girepository: Fix static build under Windows
Properly define `GI_STATIC_COMPILATION` when static build is enabled. Use `library()` instead of `shared_library()` to allow selecting static builds.
This commit is contained in:
parent
241df32d7a
commit
72d76922dc
@ -182,7 +182,7 @@ if cc.get_id() != 'msvc'
|
||||
])
|
||||
endif
|
||||
|
||||
libgirepository = shared_library('girepository-2.0',
|
||||
libgirepository = library('girepository-2.0',
|
||||
sources: girepo_sources + girepo_ffi_sources + [gi_visibility_h],
|
||||
include_directories: [configinc, girepoinc],
|
||||
c_args: gir_c_args,
|
||||
|
@ -16,6 +16,7 @@
|
||||
#mesondefine GOBJECT_STATIC_COMPILATION
|
||||
#mesondefine GIO_STATIC_COMPILATION
|
||||
#mesondefine GMODULE_STATIC_COMPILATION
|
||||
#mesondefine GI_STATIC_COMPILATION
|
||||
#mesondefine G_INTL_STATIC_COMPILATION
|
||||
#mesondefine FFI_STATIC_BUILD
|
||||
|
||||
|
@ -316,6 +316,7 @@ if glib_build_static_only
|
||||
glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1')
|
||||
glibconfig_conf.set('GIO_STATIC_COMPILATION', '1')
|
||||
glibconfig_conf.set('GMODULE_STATIC_COMPILATION', '1')
|
||||
glibconfig_conf.set('GI_STATIC_COMPILATION', '1')
|
||||
glibconfig_conf.set('G_INTL_STATIC_COMPILATION', '1')
|
||||
glibconfig_conf.set('FFI_STATIC_BUILD', '1')
|
||||
endif
|
||||
|
@ -81,7 +81,7 @@ def gen_visibility_macros(args, current_minor_version):
|
||||
- GLIB_UNAVAILABLE(maj,min)
|
||||
- GLIB_UNAVAILABLE_STATIC_INLINE(maj,min)
|
||||
|
||||
The GLIB namespace can be replaced with one of GOBJECT, GIO, GMODULE.
|
||||
The GLIB namespace can be replaced with one of GOBJECT, GIO, GMODULE, GI.
|
||||
"""
|
||||
|
||||
ns = args.namespace
|
||||
|
Loading…
Reference in New Issue
Block a user