[CMake] Info.plist with per-configuration information

Tim Blechmann tim at klingt.org
Wed May 14 05:33:41 EDT 2014


hi david,

> I just created a test project "t2" with Xcode itself, and in the
> projects source file "t2-Info.plist", I added a "Get info string" key
> with a value of "This is the ${CONFIGURATION} build."
> 
> Then, after I build the Debug config, and inspect the generated bundle,
> the Info.plist inside of it contains the string "This is the Debug build."
> 
> Perhaps you could use a single all-config custom
> MACOSX_BUNDLE_INFO_PLIST and use similar strings inside it? Or do you
> need more than just the configuration value as a string to be different
> in the resulting file?

hmm, i've ended up using configure_file to generate the initial
Info.plist, setting both MACOSX_BUNDLE_INFO_PLIST and
XCODE_ATTRIBUTE_INFOPLIST_FILE attributes and executing PlistBuddy in a
custom command with a generator expression ... not too elegant, but it
works with both ninja and xcode ...

cheers,
tim




More information about the CMake mailing list