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

@ -154,7 +154,7 @@ def configure(conf):
autowaf.check_pkg(conf, 'pango', uselib_store='PANGO', atleast_version='1.20', mandatory=True)
autowaf.check_pkg(conf, 'cairo', uselib_store='CAIRO', atleast_version='1.12', mandatory=True)
autowaf.check_pkg(conf, 'pangocairo', uselib_store='PANGOCAIRO', mandatory=True)
if conf.env['build_target'] == 'mingw':
if conf.env['build_target'] == 'mingw' or conf.env['build_target'] == 'msvc':
autowaf.check_pkg(conf, 'gio-windows-2.0', uselib_store='GIO-WINDOWS', mandatory=True)
elif sys.platform != 'darwin':
autowaf.check_pkg(conf, 'gio-unix-2.0', uselib_store='GIO-UNIX', mandatory=True)
@ -186,7 +186,7 @@ def build(bld):
obj.uselib += ' OSX' # -framework Cocoa -framework CoreFoundation -framework ApplicationServices
obj.includes += ['quartz', 'quartz/ydk', 'ydk/quartz']
obj.export_includes += ['quartz']
elif bld.env['build_target'] == 'mingw':
elif bld.env['build_target'] == 'mingw' or bld.env['build_target'] == 'msvc':
obj.source = libydk_sources + libydk_win32_sources
obj.cflags += ['-mms-bitfields', '-Wl,--export-all-symbols']
obj.uselib += ' GIO-WINDOWS'