Package org.gradle.language.cpp

## Interface CppLibrary

- All Superinterfaces:
    `ComponentWithBinaries`, `ComponentWithDependencies`, `ComponentWithTargetMachines`, `CppComponent`, `Named`, `ProductionComponent`, `ProductionCppComponent`, `SoftwareComponent`

      @Incubating
      public interface CppLibrary
      extends ProductionCppComponent

  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.

  Since:
    4.2

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Named

      `Named.Namer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Configuration` | `getApiDependencies()` | Returns the API dependencies of this library.
    `LibraryDependencies` | `getDependencies()` | Returns the dependencies of this library.
    `SetProperty<Linkage>` | `getLinkage()` | Returns the list of linkage of this library.
    `FileCollection` | `getPublicHeaderDirs()` | Returns the public header file directories of this component, as defined in `getPublicHeaders()`.
    `FileTree` | `getPublicHeaderFiles()` | Returns public header files of this component.
    `ConfigurableFileCollection` | `getPublicHeaders()` | Defines the public header file directories of this library.
    `void` | `publicHeaders​(Action<? super ConfigurableFileCollection> action)` | Configures the public header directories for this component.

    - ### Methods inherited from interface org.gradle.language.ComponentWithTargetMachines

      `getTargetMachines`

    - ### Methods inherited from interface org.gradle.language.cpp.CppComponent

      `getBaseName, getBinaries, getCppSource, getHeaderFiles, getImplementationDependencies, getPrivateHeaderDirs, getPrivateHeaders, getSource, privateHeaders, source`

    - ### Methods inherited from interface org.gradle.api.Named

      `getName`

    - ### Methods inherited from interface org.gradle.language.cpp.ProductionCppComponent

      `getDevelopmentBinary`

- - ### Method Detail

    - #### getPublicHeaders

          ConfigurableFileCollection getPublicHeaders()

      Defines the public header file directories of this library.

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

    - #### publicHeaders

          void publicHeaders​(Action<? super ConfigurableFileCollection> action)

      Configures the public header directories for this component.

    - #### getPublicHeaderDirs

          FileCollection getPublicHeaderDirs()

      Returns the public header file directories of this component, as defined in `getPublicHeaders()`.

    - #### getPublicHeaderFiles

          FileTree getPublicHeaderFiles()

      Returns public header files of this component.
      Since:
        4.3

    - #### getDependencies

          LibraryDependencies getDependencies()

      Returns the dependencies of this library.
      Specified by:
        `getDependencies` in interface `ComponentWithDependencies`
      Since:
        4.6

    - #### getApiDependencies

          Configuration getApiDependencies()

      Returns the API dependencies of this library.

    - #### getLinkage

          SetProperty<Linkage> getLinkage()

      Returns the list of linkage of this library.
      Since:
        4.5