CPack wrapper for Conan to create C and C++ packages.
CPackConan may be used to create Conan packages using CPack.
CPackConan is a CPack External generator therefore it uses the CPACK_XXX
variables used by CPack.
CPackConan has specific features which are controlled by the specific
CPACK_CONAN_XXX
variables. In the "one per group" mode
(see CPACK_COMPONENTS_GROUPING
), <compName>
placeholder
in the variables below would contain a group name (uppercased and turned into
a "C" identifier).
List of CPackConan specific variables:
Enable component packaging for CPackConan
- Mandatory : NO
- Default : OFF
Settings that needed to build the package, overwriting the defaults (host machine). See Conan export-pkg command for more information.
- Mandatory : YES
- Default: None
The Conan package name.
- Mandatory : YES
- Default :
CPACK_PACKAGE_NAME
The Conan package version. See Conan version attribute for more information.
- Mandatory : YES
- Default :
CPACK_PACKAGE_VERSION
A long description of the package for UI display.
- Mandatory : YES
- Default :
CPACK_COMPONENT_<compName>_DESCRIPTION
,CPACK_COMPONENT_GROUP_<groupName>_DESCRIPTION
,CPACK_PACKAGE_DESCRIPTION
A software package license custom string or a SPDX license identifier such as
MIT
, BSD-3-Clause
or LGPL-3.0-or-later
. See Conan license attribute for more information.
- Mandatory : NO
- Default : None
Intended to add information about the author, in case it is different from the Conan user. It is possible that the Conan user is the name of an organization, project, company or group, and many users have permissions over that account. In this case, the author information can explicitly define who is the creator/maintainer of the package. See Conan author attribute for more information.
- Mandatory : NO
- Default :
CPACK_PACKAGE_VENDOR
A URL for the package´s home page. See Conan url attribute for more information.
- Mandatory : NO
- Default :
CPACK_PACKAGE_HOMEPAGE_URL
A list of topics that describe the package and aid discoverability of packages through search and filtering. See Conan topics attribute for more information.
- Mandatory : NO
- Default : None
A list of Conan generators that are used on install
command in your project folder.
Check the full generators list.
- Mandatory : YES
- Default : None
A list of Conan settings that a used by Conan to calculate the binary package id. See Conan settings attribute for more information.
- Mandatory : YES
- Default : None
A list of package dependencies. See Conan requires attribute for more information.
- Mandatory : NO
- Default : None
CPACK_CONAN_PACKAGE_REQUIRES_<requireName>_VERSION
CPACK_CONAN_<compName>_PACKAGE_REQUIRES_<requireName>_VERSION
A version specification for the particular dependency, where <requireName>
is an item of the requires list transformed with string(MAKE_C_IDENTIFIER)
command.
- Mandatory : NO
- Default : None
CPACK_CONAN_PACKAGE_REQUIRES_<requireName>_OPTIONS
CPACK_CONAN_<compName>_PACKAGE_REQUIRES_<requireName>_OPTIONS
A list of option names for the particular dependency, where <requireName>
is an item of the requires list transformed with string(MAKE_C_IDENTIFIER)
command.
- Mandatory : NO
- Default : None
CPACK_CONAN_PACKAGE_REQUIRES_<requireName>_OPTIONS_<optionName>
CPACK_CONAN_<compName>_PACKAGE_REQUIRES_<requireName>_OPTIONS_<optionName>
The value for the particular dependency option, where <requireName>
is an item of the requires list
and <optionName>
is an item of the requires options list
transformed with string(MAKE_C_IDENTIFIER)
command.
- Mandatory : NO
- Default : None
CPACK_CONAN_PACKAGE_REQUIRES_<requireName>_OPTIONS_CONDITIONS
CPACK_CONAN_<compName>_PACKAGE_REQUIRES_<requireName>_OPTIONS_CONDITIONS
A list of names for the particular dependency option condition, where <requireName>
is an item of the requires list
transformed with string(MAKE_C_IDENTIFIER)
command.
- Mandatory : NO
- Default : None
CPACK_CONAN_PACKAGE_REQUIRES_<requireName>_OPTIONS_CONDITIONS_<conditionName>
CPACK_CONAN_<compName>_PACKAGE_REQUIRES_<requireName>_OPTIONS_CONDITIONS_<conditionName>
A python condition that is injected into the generated Conan recipe and used to create a conditional block for the particular dependency option,
where <requireName>
is an item of the requires list
and <conditionName>
is an item of the conditional requires options list and
transformed with string(MAKE_C_IDENTIFIER)
command.
- Mandatory : NO
- Default : None
CPACK_CONAN_PACKAGE_REQUIRES_<requireName>_OPTIONS_<optionName>_CONDITIONS_<conditionName>
CPACK_CONAN_<compName>_PACKAGE_REQUIRES_<requireName>_OPTIONS_<optionName>_CONDITIONS_<conditionName>
The value for the conditional particular dependency option, where <requireName>
is an item of the requires list
, <optionName>
is an item of the requires options list and
<conditionName>
is an item of the conditional requires options list and
transformed with string(MAKE_C_IDENTIFIER)
command.
- Mandatory : NO
- Default : None
The user/channel of the generated package. See Conan export-pkg command for more information.
- Mandatory : NO
- Default : None
This variable can optionally specify the full path to a CMake script file to be run as a pre-package step in the CPack invocation.
It is invoked before the packaging took place and may run external tools. The script has access to the variables defined by the CPack config file,
additionally the CPACK_CONAN_PACKAGE_COMPONENTS
variable contains the currently processed components.
- Mandatory : NO
- Default : None
This variable can optionally specify the full path to a CMake script file to be run as a post-package step in the CPack invocation.
It is invoked after the packaging took place and may run external tools. The script has access to the variables defined by the CPack config file,
additionally the CPACK_CONAN_PACKAGE_COMPONENTS
variable contains the currently processed components.
- Mandatory : NO
- Default : None