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 GitHub
parent 2a2cdb587d
commit 918839fb1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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