Skip to content

Add Variable for List of Dependency Link Targets #118

@kilo52

Description

@kilo52

In the dependency() function provided by C and C++ project source templates of project-init, add a function parameter to allow a dependency declaration to specify a list of targets that should be appended to a list in the CMake cache. This can then be used by projects in calls to the CMake target_link_libraries() function to automatically link all targets that are declared dependencies of the underlying project. The benefit is that simply adding a new dependency automatically sets up the linking to the dependency targets in a basic setting. This is less error prone than having to remember to add those targets to the call to the target_link_libraries() function.

Metadata

Metadata

Assignees

Labels

CAffects project source templates or init code for CC++Affects project source templates or init code for C++ImprovementImprovement of an existing featureTemplatesChanges in project source templates

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions