[CMake] Separating SET_TARGET_PROPERTIES() for different configurations

Daniel Dekkers d.dekkers at cthrough.nl
Fri Oct 14 05:58:59 EDT 2011


Hi,

I don't think the [variant=###] method works to separate SET_TARGET_PROPERTIES() to different configurations in Xcode (4.0.2).

If I try this (simple example)...

SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES XCODE_ATTRIBUTE_COMPRESS_PNG_FILES[variant=Debug] YES )
SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES XCODE_ATTRIBUTE_COMPRESS_PNG_FILES[variant=Release] NO )

... the result in Xcode is:

Compress PNG Files Yes
  Debug Yes
    No condition allowed No
    No condition allowed Yes
  MinSizeRel Yes
    No condition allowed No
    No condition allowed Yes
  RelWithDebInfo Yes
    No condition allowed No
    No condition allowed Yes
  Release Yes
    No condition allowed No
    No condition allowed Yes

Instead of:

Compress PNG Files <Multiple values>
   Debug Yes
   Release No

Would there be another way of achieving separate configuration settings that anyone knows of?

Kind Regards,

Daniel



More information about the CMake mailing list