CPGen
C++ project generator
Loading...
Searching...
No Matches
Public Attributes | List of all members
TargetInjection Struct Reference

Describes the CMake snippets that a module contributes to a target. More...

#include <Resolved.hpp>

Public Attributes

std::string target_name
 Name of the CMake target that receives this injection.
 
std::string module_name
 Identifier of the module that produced this injection.
 
std::vector< std::string > link
 Libraries to pass to target_link_libraries.
 
std::optional< std::string > cmake_include
 Optional CMake module to include() (e.g. "GoogleTest").
 
std::optional< std::string > post_link
 

Detailed Description

Describes the CMake snippets that a module contributes to a target.

Each module can inject link libraries, an optional include() directive, and an optional post-link command (e.g. gtest_discover_tests) into one or more named targets.

Member Data Documentation

◆ cmake_include

std::optional<std::string> TargetInjection::cmake_include

Optional CMake module to include() (e.g. "GoogleTest").

◆ link

std::vector<std::string> TargetInjection::link

Libraries to pass to target_link_libraries.

◆ module_name

std::string TargetInjection::module_name

Identifier of the module that produced this injection.

◆ post_link

std::optional<std::string> TargetInjection::post_link

Optional command appended after target_link_libraries (e.g. "gtest_discover_tests(${TARGET_NAME})").

◆ target_name

std::string TargetInjection::target_name

Name of the CMake target that receives this injection.


The documentation for this struct was generated from the following file: