Hello-
Is there a way to have the IDE compile to Cocoa (instead of Cocoa) when compiling on MacOS (Darwin) OS but compile to the default widgetset (Linux->GTK2; Windows->WinAPI) on other OSes? Effectively, I would like the IDE to do what I can do in the command line with the following script:
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "macOS compiling for Cocoa, instead of default Carbon widgetset"
lazbuild -B --ws=cocoa ./simplelaz.lpr
else
lazbuild -B ./simplelaz.lpi
fi
1.) I realize I set Additions&Overides to "LCLWidgetType:=cocoa", which works on MacOS (Darwin), but fails on other OSes.
2.) This old page suggests there is a "-dCarbonUseCocoa", but this seems to be for building the IDE, and adding it as a "Custom Option" for a project has no impact.
http://wiki.freepascal.org/Carbon_Interface3.) I know I can go to "Custom Options" and set the conditional
CustomOptions += ' -dLCLCocoa';
But the "Show Option" button then lists BOTH options "-dLCLcarbon -dLCLCocoa" and the project is compiled to Carbon.