Target Properties

Let's learn about target properties and transitive usage requirements, as well as how to deal with conflicting propagated properties in CMake.

Targets have properties that work similarly to fields of C++ objects. We can modify some of these properties, and others are read-only. CMake defines a large list of "known properties" that are available depending on the type of the target (executable, library, or custom). We can also add our own properties if we like.

Manipulating target properties

Use the following commands to manipulate the properties of a target:

Get hands-on with 1200+ tech skills courses.