OrangesGeneratePkgConfig¶
This module provides the function oranges_create_pkgconfig_file()
.
- oranges_create_pkgconfig_file¶
oranges_create_pkgconfig_file (<targetName> [OUTPUT_DIR <outputDir>] [NAME <packageName>] [INCLUDE_REL_PATH <basePath>] [DESCRIPTION <projectDescription>] [URL <projectURL>] [VERSION <projectVersion>] [NO_INSTALL]|[INSTALL_DEST <installDestination>] [INSTALL_COMPONENT <componentName>] [REQUIRES <requiredPackages...>])
Generates pkgconfig files for each build configuration of the specified target.
For each build configuration, a file named <packageName>-<config>.pc
will be generated.
The pkgconfig files are populated with flags automatically based on the target <targetName>
’s flags.
Options:
OUTPUT_DIR
Specifies where the pkgconfig files will be written. If not specified, it defaults to
${CMAKE_CURRENT_BINARY_DIR}/pkgconfig
.NAME
Specifies the name of the package. If not specified, defaults to
<targetName>
.INCLUDE_REL_PATH
Specifies the path below
CMAKE_INSTALL_INCLUDEDIR
in which to look for includes. If it is empty or not specified, the pkgconfig file will specifyCMAKE_INSTALL_INCLUDEDIR
as the include directory.DESCRIPTION
The description of the package. Defaults to the value of
PROJECT_DESCRIPTION
when this function is called.URL
The website for the package. Defaults to the value of
PROJECT_HOMEPAGE_URL
when this function is called.VERSION
The version of the package. Defaults to the value of
PROJECT_VERSION
when this function is called.NO_INSTALL
If specified, the generated pkgconfig files will not be installed. Mutually exclusive with
INSTALL_DEST
andINSTALL_COMPONENT
.INSTALL_DEST
The path where the pkgconfig files will be installed to. Defaults to
${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig
. Mutually exclusive withNO_INSTALL
.INSTALL_COMPONENT
The install component for the pkgconfig files. Mutually exclusive with
NO_INSTALL
.REQUIRES
Names of other pkgconfig packages or libraries required by this package. This will automatically be populated with the names of libraries linked to by
<targetName>
.