CppLibrary - Gradle DSL Version 5.5-20190702033235+0000

# CppLibrary

API Documentation: | `CppLibrary`

Note: This class is incubating and may change in a future version of Gradle.

Configuration for a C++ library, defining the source files and header directories that make up the library plus other settings.

An instance of this type is added as a project extension by the C++ library plugin.

### Properties

Property | Description
`baseName` | Incubating Specifies the base name for this component. This name is used to calculate various output file names. The default value is calculated from the project name.
`binaries` | Incubating The binaries of this component.
`developmentBinary` | Incubating The binary of the component to use as the default for development.
`linkage` | Incubating The list of linkage of this library.
`privateHeaders` | Incubating Defines the private header file directories of this library.
`publicHeaders` | Incubating Defines the public header file directories of this library.
`source` | Incubating Defines the source files or directories of this component. You can add files or directories to this collection. When a directory is added, all source files are included for compilation.
`targetMachines` | Incubating Specifies the target machines this component should be built for. The "machines" extension property (see `TargetMachineFactory`) can be used to construct common operating system and architecture combinations.

### Methods

Method | Description
`privateHeaders(action)` | Incubating Configures the private header directories for this component.
`publicHeaders(action)` | Incubating Configures the public header directories for this component.
`source(action)` | Incubating Configures the source files or directories for this component.

### Script blocks

No script blocks

### Property details

#### ``Property`<`String`>` `baseName`

Note: This property is incubating and may change in a future version of Gradle.

Specifies the base name for this component. This name is used to calculate various output file names. The default value is calculated from the project name.

#### ``BinaryCollection`<? extends `SoftwareComponent`>` `binaries` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

The binaries of this component.

#### ``Provider`<? extends `CppBinary`>` `developmentBinary`

Note: This property is incubating and may change in a future version of Gradle.

The binary of the component to use as the default for development.

#### ``SetProperty`<`Linkage`>` `linkage`

Note: This property is incubating and may change in a future version of Gradle.

The list of linkage of this library.

#### `ConfigurableFileCollection` `privateHeaders` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Defines the private header file directories of this library.

When this collection is empty, the directory `src/main/headers` is used by default.

#### `ConfigurableFileCollection` `publicHeaders` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Defines the public header file directories of this library.

When this collection is empty, the directory `src/main/public` is used by default.

#### `ConfigurableFileCollection` `source` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Defines the source files or directories of this component. You can add files or directories to this collection. When a directory is added, all source files are included for compilation.

When this collection is empty, the directory `src/main/cpp` is used by default.

#### ``SetProperty`<`TargetMachine`>` `targetMachines`

Note: This property is incubating and may change in a future version of Gradle.

Specifies the target machines this component should be built for. The "machines" extension property (see `TargetMachineFactory`) can be used to construct common operating system and architecture combinations.

For example:

    targetMachines = [machines.linux.x86_64, machines.windows.x86_64]

### Method details

#### `void` `privateHeaders`(``Action`<? super `ConfigurableFileCollection`>` action)

Note: This method is incubating and may change in a future version of Gradle.

Configures the private header directories for this component.

#### `void` `publicHeaders`(``Action`<? super `ConfigurableFileCollection`>` action)

Note: This method is incubating and may change in a future version of Gradle.

Configures the public header directories for this component.

#### `void` `source`(``Action`<? super `ConfigurableFileCollection`>` action)

Note: This method is incubating and may change in a future version of Gradle.

Configures the source files or directories for this component.