Change to ytk wscript, to work slightly better with MSVC

Replace obj.ldflags  = '-l... with obj.lib  = ['... to work for both MinGW and MSVC.
Also, obj.linkflags = ['-Wl,--export-all-symbols'] only happens for MinGW.

(Previously, both lines were ignored by MSVC.
This commit is contained in:
EZ4Stephen 2025-11-07 12:53:00 +04:00 committed by Robin Gareus
parent 637d99167a
commit 8ca2d12198
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -298,8 +298,9 @@ def build(bld):
elif bld.env['build_target'] == 'mingw' or bld.env['build_target'] == 'msvc':
obj.source = libytk_sources + libytk_win32_sources
obj.defines += [ 'INSIDE_GTK_WIN32', 'DLL_EXPORT', 'PIC' ]
obj.ldflags = '-limm32 -lole32 -lgdi32 -lcomdlg32 -lwinspool -lcomctl32 -luuid'
obj.linkflags = ['-Wl,--export-all-symbols']
obj.lib = ['imm32', 'ole32', 'gdi32', 'comdlg32', 'winspool', 'comctl32', 'uuid']
if bld.env['build_target'] == 'mingw':
obj.linkflags = ['-Wl,--export-all-symbols']
else:
obj.source = libytk_sources + libytk_x11_sources
obj.uselib += ' X11 XEXT'