mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 14:51:35 +01:00
* 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:
parent
c84744b27f
commit
bc7e54c3f0
@ -114,6 +114,7 @@ procedure tresourcefile.compile(output: tresoutput; const OutName: ansistring);
|
|||||||
var
|
var
|
||||||
respath,
|
respath,
|
||||||
srcfilepath,
|
srcfilepath,
|
||||||
|
preprocessorbin,
|
||||||
s,
|
s,
|
||||||
bin,
|
bin,
|
||||||
resbin : TCmdStr;
|
resbin : TCmdStr;
|
||||||
@ -157,9 +158,15 @@ begin
|
|||||||
if respath='' then
|
if respath='' then
|
||||||
respath:='.';
|
respath:='.';
|
||||||
Replace(s,'$INC',maybequoted(respath));
|
Replace(s,'$INC',maybequoted(respath));
|
||||||
if (target_res.resbin='windres') and
|
if (target_res.resbin='windres') then
|
||||||
(srcfilepath<>'') then
|
begin
|
||||||
s:=s+' --include '+maybequoted(srcfilepath);
|
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 }
|
{ Execute the command }
|
||||||
if not (cs_link_nolink in current_settings.globalswitches) then
|
if not (cs_link_nolink in current_settings.globalswitches) then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user