Hello,
Is there anyway to have a Lazarus project automatically include/exclude a package depending on the OS it is running on?
As a concrete example, consider my projects that use Ryan Joseph's lazmetalcontrol for Metal graphics on MacOS, but these same projects use LazOpenGLContext for graphics on Linux and Windows:
https://github.com/neurolabusc/Metal-DemosAt the moment, the user needs to open the Project Inspector and remove the "lazmetalcontrol" from the Required Packages in order to compile on Linux or Windows.
I use IFDEFs in the main code to select between these two options, but I have not found a way to specify OS-specific packages.
Another example where this would be useful is Dmitry's
http://wiki.freepascal.org/macOS_extensionsThis package can provide Mac-specific features but is necessarily MacOS specific. Again, it would be nice to include this package when compiling for MacOS and exclude when compiling for Windows and Linux.