-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Add default Info.plist for macOS with some important keys
The default Info.plist shipped with CMake lacks an NSPrincipalClass entry, which is crucial for making macOS apps run in full resolution on retina screens. We make sure the file is only picked up on macOS, not iOS and friends, since those platforms require another principal class. If needed we can extract the value out as a CMake variable and use the same file for all Apple platforms. Doing so would assume all keys are single-platform only, so if that's not the case we need platform-specific files. We should probably extract the package type out as a variable too, so that the file can be used for both apps, plugins, and frameworks, but doing so requires setting up that variable somewhere based on the target type, which CMake doesn't allow in an easy way. The file itself is based on the file CMake ships, combined with keys inherited from Qt's existing plist templates for qmake, and adjusted to match what Xcode generates by default these days. Change-Id: I3f5109e5fff63cdbd109a99d4008948d4bd2102b Reviewed-by: Alexandru Croitor <[email protected]>
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
|
||
<key>CFBundleName</key> | ||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> | ||
|
||
<key>CFBundleVersion</key> | ||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> | ||
<key>CFBundleLongVersionString</key> | ||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string> | ||
|
||
<key>LSMinimumSystemVersion</key> | ||
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string> | ||
|
||
<key>CFBundleGetInfoString</key> | ||
<string>${MACOSX_BUNDLE_INFO_STRING}</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string> | ||
|
||
<key>CFBundleIconFile</key> | ||
<string>${MACOSX_BUNDLE_ICON_FILE}</string> | ||
|
||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
|
||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
|
||
<key>NSSupportsAutomaticGraphicsSwitching</key> | ||
<true/> | ||
</dict> | ||
</plist> |