mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 20:22:11 +01:00
Windows: Do not link DLL specific resources when doing a static build
Fixes: #2585
This commit is contained in:
parent
51e6e4fc2f
commit
9159e84ce5
@ -313,13 +313,15 @@ glib_sources = files(
|
|||||||
platform_deps = []
|
platform_deps = []
|
||||||
|
|
||||||
if host_system == 'windows'
|
if host_system == 'windows'
|
||||||
glib_win_rc = configure_file(
|
if get_option('default_library') == 'shared'
|
||||||
input: 'glib.rc.in',
|
glib_win_rc = configure_file(
|
||||||
output: 'glib.rc',
|
input: 'glib.rc.in',
|
||||||
configuration: glibconfig_conf,
|
output: 'glib.rc',
|
||||||
)
|
configuration: glibconfig_conf,
|
||||||
glib_win_res = windows.compile_resources(glib_win_rc)
|
)
|
||||||
glib_sources += [glib_win_res]
|
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')
|
glib_sources += files('gwin32.c', 'gspawn-win32.c', 'giowin32.c')
|
||||||
platform_deps = [winsock2, cc.find_library('winmm')]
|
platform_deps = [winsock2, cc.find_library('winmm')]
|
||||||
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
|
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
|
||||||
|
@ -43,7 +43,7 @@ gobject_sources = files(
|
|||||||
'gvaluetypes.c',
|
'gvaluetypes.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
if host_system == 'windows'
|
if host_system == 'windows' and get_option('default_library') == 'shared'
|
||||||
gobject_win_rc = configure_file(
|
gobject_win_rc = configure_file(
|
||||||
input: 'gobject.rc.in',
|
input: 'gobject.rc.in',
|
||||||
output: 'gobject.rc',
|
output: 'gobject.rc',
|
||||||
|
@ -200,6 +200,9 @@ endif
|
|||||||
glib_hidden_visibility_args = []
|
glib_hidden_visibility_args = []
|
||||||
if get_option('default_library') != 'static'
|
if get_option('default_library') != 'static'
|
||||||
if host_system == 'windows' or host_system == 'cygwin'
|
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)
|
glib_conf.set('DLL_EXPORT', true)
|
||||||
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
|
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
|
||||||
glib_conf.set('_GLIB_EXTERN', '__declspec(dllexport) extern')
|
glib_conf.set('_GLIB_EXTERN', '__declspec(dllexport) extern')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user