[CMake] Understanding SET- and GET_TARGET_PROPERTY

wedekind wedekind at caesar.de
Tue Jun 13 07:33:06 EDT 2006


Hello all,

I am using CMake 2.2.3 and have a question about SET_TARGET_PROPERTIES and
GET_TARGET_PROPERTY.

If I am setting a target-specific property like this

SET_TARGET_PROPERTIES(myproject1 PROPERTIES myprop1 myvalue1)

I would like to read this property from another target myproject2 like this

GET_TARGET_PROPERTY(PROPVAR1 myproject1 myprop1)

Unfortunately this does not work like I have expected it. Can setting and
getting target properties be used this way? Can I expect to have a target
property be set for a target myproject1 if I want to read it during
processing of an arbitrary target myproject2?

Thanks and best regards

Marco




More information about the CMake mailing list