mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-23 21:31:42 +02: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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user