Search path for $INCLUDE

I have a shared project (Delphi, .NET, .Java, etc.) with .inc files and .pas files stored in many subdirectories. Each .pas file contains a reference to an include file like :

{$INCLUDE defines.inc}

This include file is added to the project to compile. In previous v9 the project compiled using a full path to defines.inc from the project. In v10 of Elements this project doesn’t compile anymore reporting :

(E215) File “defines.inc” not found

The problem is that this structure is valid for developers only, clients get full sources in flatten one directory structure. I found few solutions to solve this problem :

  1. Copy .inc files to each sub-directory before compilation so I don’t have to change sources
  2. Add relative path in $include to avoid copying files but breaking a client compilation where relative paths are not existing
  3. Solution 2 with pre-processor that cuts all relative paths before building the installer data

but none of these solutions are elegant and suitable for our existing production system.
So before we fully migrate to version 10, is there any other option to solve this? How can we tell the compiler where to look for .inc files? Ideal would be the Search Path or Reference Path property like in Delphi where we can add extra paths to files. Another option would be checking system PATH or environmental variable.

I attach sample test to demonstrate the problem ConsoleApplication11.zip (30.1 KB)

Thanks, logged as bugs://80958

bugs://80958 got closed with status fixed.

You can use <IncludeSearchPath>somePath</IncludeSearchPath>, if and only if classic preprocessor is set.

Thanks.