On Mar 13, 2019, at 09:57, René J.V. Bertin wrote:
> Is anyone using cmake for the development of applications for Apple's
> non-desktop OS flavours (iOS, WatchOS etc)?
>
> Reason for asking is that CMake doesn't set the Info.plist flags necessary
> for high-DPI support because it uses the same template plist for all
> application bundles regardless of the targeted Apple OS.
>
> A priori the only thing required for that support is to set the
> NSPrincipalClass property to NSApplication and that would be easy to add to
> the plist template, as a MacPorts patch. The question is whether a variant
> should be provided to disable that patch.
I cannot speak to non-macOS operating systems. But for macOS, Apple
intentionally does not enable Retina support in apps by default. Apple requires
each app to specify that it supports Retina mode. MacPorts and CMake should not
second-guess Apple about that. Some apps may not work correctly in Retina mode,
and we and CMake should not break those apps by defaulting to Retina mode.
Retina mode can be enabled in two ways in the Info.plist.
1. NSPrincipalClass can be set to any value. If the app uses NSApplication, it
will read this value to instantiate the principal class. NSApplication supports
Retina mode, so Apple enables Retina mode when this key is present in the
Info.plist, since the presence of this key suggests that the app uses
NSApplication. Setting this key to any value in an application that does use
NSApplication would be inappropriate, but doing so will still enable Retina
mode.
2. NSHighResolutionCapable can be set to 1. This is what should be done in
applications that do not use NSApplication.