On Fri, 9 Sep 2011 14:16:27 -0300
Leonardo M. Ramé <[email protected]> wrote:

> Hi, is there a way to setup unit search paths per platform?.
> 
> I usually develp for Linux and Windows, and some times, I use units that
> can't be accessed using the same relative paths on both platforms.
> 
> For example, on Linux I use:
> 
> ../synapse
> 
> To let the compiler find units from Synapse library.

Have you tried the Lazarus package 'laz_synapse.lpk' of Synapse?

It seems a bit outdated, but that can be remedied easily:
Open the package file 'laz_synapse.lpk'. In the package editor / More /
Show missing files. This will show a dialog with two files. Click to
remove these files.
Then compiling the package should work.

I will ask Lukas to update the package.

 
> On Windows, the synapse directory is installed on ../../synapse, for
> example.
> 
> I would be nice to have conditionals or build modes for each platform.

You can do that with the Lazarus trunk version.

http://wiki.lazarus.freepascal.org/Macros_and_Conditionals#Conditionals

For example:

if TargetOS='win32' then
  UnitPath := '../../synapse'
else
  UnitPath := '../synapse';


Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to