* search preprocessor binary and add it as command line parameter for windres, so that the cpp doesn't need to be on the path

git-svn-id: trunk@8670 -
This commit is contained in:
Vincent Snijders 2007-09-28 19:53:19 +00:00
parent c84744b27f
commit bc7e54c3f0

View File

@ -114,6 +114,7 @@ procedure tresourcefile.compile(output: tresoutput; const OutName: ansistring);
var
respath,
srcfilepath,
preprocessorbin,
s,
bin,
resbin : TCmdStr;
@ -157,9 +158,15 @@ begin
if respath='' then
respath:='.';
Replace(s,'$INC',maybequoted(respath));
if (target_res.resbin='windres') and
(srcfilepath<>'') then
s:=s+' --include '+maybequoted(srcfilepath);
if (target_res.resbin='windres') then
begin
if (srcfilepath<>'') then
s:=s+' --include '+maybequoted(srcfilepath);
{ try to find a preprocessor }
preprocessorbin := respath+'cpp'+source_info.exeext;
if FileExists(preprocessorbin,true) then
s:=s+' --preprocessor='+preprocessorbin;
end;
{ Execute the command }
if not (cs_link_nolink in current_settings.globalswitches) then
begin