Prepare for MSVC support in y[dt]k

This commit is contained in:
Robin Gareus 2025-10-22 15:34:21 +02:00
parent 4bdad3a20d
commit d8a379bc6d
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 7 additions and 7 deletions

View file

@ -263,7 +263,7 @@ def configure(conf):
autowaf.check_pkg(conf, 'cairo', uselib_store='CAIRO', atleast_version='1.12', mandatory=True)
autowaf.check_pkg(conf, 'pangocairo', uselib_store='PANGOCAIRO', mandatory=True)
autowaf.check_pkg(conf, 'gmodule-2.0', uselib_store='GMODULE', mandatory=True)
if conf.env['build_target'] != 'mingw' and sys.platform != 'darwin': # Linux
if conf.env['build_target'] != 'mingw' and conf.env['build_target'] != 'msvc' and sys.platform != 'darwin': # Linux
autowaf.check_pkg(conf, 'x11', uselib_store='X11', system=True, mandatory=True)
autowaf.check_pkg(conf, 'xext', uselib_store='XEXT', system=True, mandatory=True)
@ -294,7 +294,7 @@ def build(bld):
obj.source = libytk_sources + libytk_quartz_sources
obj.cflags += ['-xobjective-c']
obj.uselib += ' OSX' # -framework Cocoa -framework CoreFoundation -framework ApplicationServices
elif bld.env['build_target'] == 'mingw':
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'