mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Merge branch 'windows-static-resource' into 'main'
Windows: Do not link DLL specific resources when doing a static build Closes #2585 See merge request GNOME/glib!2457
This commit is contained in:
commit
f242299b3e
@ -313,13 +313,15 @@ glib_sources = files(
|
||||
platform_deps = []
|
||||
|
||||
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]
|
||||
if get_option('default_library') == 'shared'
|
||||
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]
|
||||
endif
|
||||
glib_sources += files('gwin32.c', 'gspawn-win32.c', 'giowin32.c')
|
||||
platform_deps = [winsock2, cc.find_library('winmm')]
|
||||
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
|
||||
|
@ -43,7 +43,7 @@ gobject_sources = files(
|
||||
'gvaluetypes.c',
|
||||
)
|
||||
|
||||
if host_system == 'windows'
|
||||
if host_system == 'windows' and get_option('default_library') == 'shared'
|
||||
gobject_win_rc = configure_file(
|
||||
input: 'gobject.rc.in',
|
||||
output: 'gobject.rc',
|
||||
|
@ -200,6 +200,9 @@ endif
|
||||
glib_hidden_visibility_args = []
|
||||
if get_option('default_library') != 'static'
|
||||
if host_system == 'windows' or host_system == 'cygwin'
|
||||
if get_option('default_library') != 'shared'
|
||||
error('On Windows default_library must be "shared" or "static" but not "both"')
|
||||
endif
|
||||
glib_conf.set('DLL_EXPORT', true)
|
||||
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
|
||||
glib_conf.set('_GLIB_EXTERN', '__declspec(dllexport) extern')
|
||||
|
Loading…
Reference in New Issue
Block a user