enable_language(C) add_library (recursion1 SHARED empty.c) set_property (TARGET recursion1 PROPERTY CUSTOM_PROPERTY1 "$>") add_library (recursion2 SHARED empty.c) set_property (TARGET recursion2 PROPERTY CUSTOM_PROPERTY2 "$>") add_custom_target (drive COMMAND echo "$>" DEPENDS recursion)