How to add an extra plist property using CMake?

Posted by Jesse Beder on Stack Overflow See other posts from Stack Overflow or by Jesse Beder
Published on 2009-11-24T20:13:18Z Indexed on 2010/04/14 15:53 UTC
Read the original article Hit count: 209

Filed under:
|
|
|

I'm trying to add the item

<key>UIStatusBarHidden</key><true/>

to my plist that's auto-generated by CMake. For certain keys, it appears there are pre-defined ways to add an item; for example:

set(MACOSX_BUNDLE_ICON_FILE ${ICON})

But I can't find a way to add an arbitrary property.

I tried using the MACOSX_BUNDLE_INFO_PLIST target property as follows: I'd like the resulting plist to be identical to the old one, except with the new property I want, so I just copied the auto-generated plist and set that as my template. But the plist uses some Xcode variables, which also look like ${foo}, and CMake grumbles about this:

Syntax error in cmake code when parsing string

  <string>com.bedaire.${PRODUCT_NAME:identifier}</string>

syntax error, unexpected cal_SYMBOL, expecting } (47)

Policy CMP0010 is not set: Bad variable reference syntax is an error. Run "cmake --help-policy CMP0010" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

In any case, I'm not even sure that this is the right thing to do. I can't find a good example or any good documentation about this. Ideally, I'd just let CMake generate everything as before, and just add a single extra line. What can I do?

© Stack Overflow or respective owner

Related posts about cmake

Related posts about plist