include headers in MSVC++ project files

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-07-27 09:50:55 +00:00
parent 22d2b5bf2f
commit 390c0cfb06
5 changed files with 40 additions and 2 deletions

View File

@@ -106,3 +106,20 @@ def getVersionMinor():
return getVersion()[1]
def getVersionRelease():
return getVersion()[2]
def headersOnly(files):
"""Filters 'files' so that only headers are left. Used with
<msvc-project-files> to add headers to VC++ projects but not files such
as arrimpl.cpp."""
def callback(cond, sources):
prf = suf = ''
if sources[0].isspace(): prefix=' '
if sources[-1].isspace(): suffix=' '
retval = []
for s in sources.split():
if s.endswith('.h'):
retval.append(s)
return '%s%s%s' % (prf, ' '.join(retval), suf)
return utils.substitute2(files, callback)