I am currently upgrading LazProfiler for supporting profiling of project-packages.
To compile the project with profiling code i have to add a runtime unit to the project and the project-packages.
I have three options:
a) copy the units to all directories (project and project-packages)
b) add path to the LazProfiler-package to OtherUnitPath of the project and the project-packages
c) create a LazProfiler runtime package and add it to the project and the project-packages
a) and b) only work if the project but not the project-packages are profiled. The problem seems to be the different places
where my runtime ppu is stored (project-dir/lib vs package-dir/lib). I get something like the following errors:
(10028) Recompiling xyz, checksum changed for C:\freepascal\projects\Test\lib\i386-win32\LazProfilerRunTime.ppu
C:\freepascal\projects\Test\formmain.pas(10,3) Fatal: (10022) Can't find unit xyz used by formmain
Fatal: (1018) Compilation aborted
where unit xyz is part of a project-package and formmain is part of the project.
c) also does not work as there is no interface to add a package dependency to packages and the AddPackageDependency of TIDEProject does not work ('package xyz not found'. Although it works when done manually!).
Any ideas how to solve this?