path: root/cmake/
diff options
authorTor Arne Vestbø <>2020-03-11 21:45:50 +0100
committerTor Arne Vestbø <>2020-03-13 15:23:56 +0100
commit3a2fa3fec5a43d30f1a93a8e89e2973f23ee4ef3 (patch)
tree42f05d5f4c0a095c7113e3f55a62544e44811444 /cmake/
parent951d49075066cf8f66906c803c32cc2c52fd8e18 (diff)
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 <>
Diffstat (limited to 'cmake/')
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/ b/cmake/
index 6d69c1f90e..e9d2d7f2dc 100644
--- a/cmake/
+++ b/cmake/
@@ -34,6 +34,11 @@ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}")
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/extra-cmake-modules/find-modules")
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/kwin")
+ # Add module directory to pick up custom Info.plist template
+ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/macos")