BaseTools: Enhance StrDefs.h to include ImageDefs.h

Enhance StrDefs.h to include ImageDefs.h for VfrCompiler to support
IMAGE_TOKEN usage.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2017-03-31 22:05:28 +08:00
parent 5e06f1a00b
commit bc7d95c00d
1 changed files with 3 additions and 0 deletions

View File

@ -1981,6 +1981,9 @@ def CreateCode(Info, AutoGenC, AutoGenH, StringH, UniGenCFlag, UniGenBinBuffer,
break
GuidMacros.append('#define %s %s' % ('_PCD_VALUE_'+TokenCName, Value))
if Info.IdfFileList:
GuidMacros.append('#include "%sImgDefs.h"' % Info.Name)
if GuidMacros:
StringH.Append('\n#ifdef VFRCOMPILE\n%s\n#endif\n' % '\n'.join(GuidMacros))