X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ddf9896893fd4908556916fcb05fecca440cdfb5..31009f332b4f34026b5ed918daab76a5a765afa7:/build/bakefiles/wxwin.py?ds=sidebyside diff --git a/build/bakefiles/wxwin.py b/build/bakefiles/wxwin.py index 3397dc54bd..02aa76234e 100644 --- a/build/bakefiles/wxwin.py +++ b/build/bakefiles/wxwin.py @@ -5,6 +5,17 @@ # +import utils + +# We use 'CFG' option in places where bakefile doesn't like it, so we must +# register a substitution function for it that provides additional knowledge +# about the option (in this case that it does not contain dir separators and +# so utils.nativePaths() doesn't have to do anything with it): +def __noopSubst(func, opt): + return '$(%s)' % opt.name +utils.addSubstituteCallback('CFG', __noopSubst) + + def mk_wxid(id): """Creates wxWindows library identifier from bakefile target ID that follows this convention: DLLs end with 'dll', static libraries @@ -18,8 +29,8 @@ def mk_wxid(id): # List of library names/ids for categories with different names: -LIBS_BASE = ['base'] -LIBS_GUI = ['core', 'html'] +LIBS_NOGUI = [''] +LIBS_GUI = ['core', 'html'] def mkLibName(wxid): """Returns string that can be used as library name, including name @@ -27,7 +38,9 @@ def mkLibName(wxid): with variables defined in common.bkl!""" if wxid == 'mono': return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXVERSIONTAG)' - if wxid in LIBS_BASE: + if wxid == 'base': + return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)$(WXVERSIONTAG)' + if wxid in LIBS_NOGUI: return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXVERSIONTAG)' % wxid return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXVERSIONTAG)' % wxid @@ -36,10 +49,12 @@ def mkDllName(wxid): suffixes, prefixes, version tags etc. This must be kept in sync with variables defined in common.bkl!""" if wxid == 'mono': - return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXCOMPILER)$(WXVERSIONTAG)' - if wxid in LIBS_BASE: - return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid - return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid + return '$(WXDLLNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' + if wxid == 'base': + return '$(WXDLLNAMEPREFIX)$(WXNAMESUFFIX)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' + if wxid in LIBS_NOGUI: + return '$(WXDLLNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' % wxid + return '$(WXDLLNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' % wxid def libToLink(wxlibname):