MantisBT - CMake
View Issue Details
0015820CMakeCMakepublic2015-10-29 08:052016-06-10 14:31
Bartosz 
Kitware Robot 
normalfeaturealways
closedmoved 
AppleOSX/iOS
CMake 3.3.2 
 
0015820: Generalize support for Apple Info.plist generation
Hello.

In following documentation there is description of target properties:
https://cmake.org/cmake/help/v3.0/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html [^]
and
https://cmake.org/cmake/help/v3.0/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.html [^]

The is no described what keys are corresponding to:

For MACOSX_FRAMEWORK_INFO_PLIST is:
MACOSX_FRAMEWORK_ICON_FILE
MACOSX_FRAMEWORK_IDENTIFIER
MACOSX_FRAMEWORK_SHORT_VERSION_STRING
MACOSX_FRAMEWORK_BUNDLE_VERSION

It will be very useful to add description of following keys, for example:
MACOSX_FRAMEWORK_ICON_FILE Key: "CFBundleIconFile"
MACOSX_FRAMEWORK_IDENTIFIER Key: "CFBundleIdentifier"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING Key: "CFBundleShortVersionString"
MACOSX_FRAMEWORK_BUNDLE_VERSION Key: CFBundleVersion

The same for MACOSX_BUNDLE_INFO_PLIST.
MACOSX_BUNDLE_ICON_FILE Key: "CFBundleIconFile"
MACOSX_BUNDLE_IDENTIFIER Key: "CFBundleIdentifier"
MACOSX_BUNDLE_SHORT_VERSION_STRING Key: "CFBundleShortVersionString"
MACOSX_BUNDLE_BUNDLE_VERSION Key: CFBundleVersion
MACOSX_BUNDLE_INFO_STRING
MACOSX_BUNDLE_GUI_IDENTIFIER
MACOSX_BUNDLE_LONG_VERSION_STRING Key: "CFBundleLongVersionString"
MACOSX_BUNDLE_BUNDLE_NAME Key: "CFBundleName"
MACOSX_BUNDLE_COPYRIGHT

etc..

The Info.plist is universal file (for every bundle), is it possible to create only one list?
Also MACOSX_ prefix is very confusing, as Info.plist is also applicable for iOS, and it looks the same.

Solution proposal:
Introduce new universal property BUNDLE_INFO_PLIST, with all possible properties, which could be written into Info.plist:
BUNDLE_CF_ICON_FILE Key: "CFBundleIconFile"
BUNDLE_CF_IDENTIFIER Key: "CFBundleIdentifier"
BUNDLE_CF_SHORT_VERSION_STRING Key: "CFBundleShortVersionString"
BUNDLE_CF_BUNDLE_VERSION Key: CFBundleVersion
BUNDLE_NS_HUMAN_READABLE_COPYRIGHT Key: "NSHumanReadableCopyright"


More information about keys Core Foundation keys:
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html [^]

https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html [^]

https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html [^]

No tags attached.
Issue History
2015-10-29 08:05BartoszNew Issue
2015-10-29 08:10BartoszNote Added: 0039701
2015-10-29 08:12BartoszNote Edited: 0039701bug_revision_view_page.php?bugnote_id=39701#r1937
2015-10-29 08:15BartoszNote Edited: 0039701bug_revision_view_page.php?bugnote_id=39701#r1938
2015-10-29 11:31Brad KingNote Added: 0039703
2015-10-30 06:07BartoszNote Added: 0039707
2015-10-30 06:07BartoszNote Edited: 0039707bug_revision_view_page.php?bugnote_id=39707#r1942
2015-10-30 09:11Brad KingNote Added: 0039710
2015-10-30 09:13Brad KingSeverityminor => feature
2015-10-30 09:13Brad KingStatusnew => backlog
2015-10-30 09:13Brad KingSummarylack of descrition of corresponding keys inside MACOSX_FRAMEWORK_INFO_PLIST and MACOSX_BUNDLE_INFO_PLIST => Generalize support for Apple Info.plist generation
2015-10-30 09:13Brad KingSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1944#r1944
2015-10-30 09:13Brad KingAdditional Information Updatedbug_revision_view_page.php?rev_id=1946#r1946
2016-06-10 14:29Kitware RobotNote Added: 0042872
2016-06-10 14:29Kitware RobotStatusbacklog => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039701)
Bartosz   
2015-10-29 08:10   
(edited on: 2015-10-29 08:15)
Another solution:
1. Update documentation for MACOSX_FRAMEWORK_INFO_PLIST and MACOSX_BUNDLE_INFO_PLIST

2. Create general INFO_PLIST, with following properties:
INFO_PLIST_CF_BUNDLE_ICON_FILE Key: "CFBundleIconFile"
INFO_PLIST_CF_BUNDLE_IDENTIFIER Key: "CFBundleIdentifier"
INFO_PLIST_CF_BUNDLE_SHORT_VERSION_STRING Key: "CFBundleShortVersionString"
INFO_PLIST_CF_BUNDLE_VERSION Key: CFBundleVersion
INFO_PLIST_NS_HUMAN_READABLE_COPYRIGHT Key: "NSHumanReadableCopyright"
etc.

3. Deprecate MACOSX_FRAMEWORK_INFO_PLIST and MACOSX_BUNDLE_INFO_PLIST

(0039703)
Brad King   
2015-10-29 11:31   
IIRC the "MACOSX_" prefix on the name pre-dates iOS, or at least any attempt to use CMake to build for iOS. It would be nice to gain more general support for Info.plist files.
(0039707)
Bartosz   
2015-10-30 06:07   
Thanks Brad.

Is is possible to at least update documentation, with information about corresponding keys (eg. MACOSX_FRAMEWORK_ICON_FILE Key: "CFBundleIconFile") ?

It will be very useful from developer perspective

(0039710)
Brad King   
2015-10-30 09:11   
Documentation updated here:

 Help: Document target properties setting Info.plist fields
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a7f042a [^]
(0042872)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.