Skip to content

CPack wrapper for Conan to create C and C++ packages.

License

Notifications You must be signed in to change notification settings

bjoernrennfanz/cpack-conan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cpack-conan

CPack wrapper for Conan to create C and C++ packages.

Variables specific to CPack Conan generator

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:

CPACK_CONAN_COMPONENT_INSTALL

Enable component packaging for CPackConan

  • Mandatory : NO
  • Default : OFF

CPACK_CONAN_TOOL_SETTINGS

Settings that needed to build the package, overwriting the defaults (host machine). See Conan export-pkg command for more information.

  • Mandatory : YES
  • Default: None

CPACK_CONAN_PACKAGE_NAME
CPACK_CONAN_<compName>_PACKAGE_NAME

The Conan package name.

CPACK_CONAN_PACKAGE_VERSION
CPACK_CONAN_<compName>_PACKAGE_VERSION

The Conan package version. See Conan version attribute for more information.

CPACK_CONAN_PACKAGE_DESCRIPTION
CPACK_CONAN_<compName>_PACKAGE_DESCRIPTION

A long description of the package for UI display.

CPACK_CONAN_PACKAGE_LICENSE
CPACK_CONAN_<compName>_PACKAGE_LICENSE

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

CPACK_CONAN_PACKAGE_AUTHOR
CPACK_CONAN_<compName>_PACKAGE_AUTHOR

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.

CPACK_CONAN_PACKAGE_URL
CPACK_CONAN_<compName>_PACKAGE_URL

A URL for the package´s home page. See Conan url attribute for more information.

CPACK_CONAN_PACKAGE_TOPICS
CPACK_CONAN_<compName>_PACKAGE_TOPICS

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

CPACK_CONAN_PACKAGE_GENERATORS
CPACK_CONAN_<compName>_PACKAGE_GENERATORS

A list of Conan generators that are used on install command in your project folder. Check the full generators list.

  • Mandatory : YES
  • Default : None

CPACK_CONAN_PACKAGE_SETTINGS
CPACK_CONAN_<compName>_PACKAGE_SETTINGS

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

CPACK_CONAN_PACKAGE_REQUIRES
CPACK_CONAN_<compName>_PACKAGE_REQUIRES

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

CPACK_CONAN_PACKAGE_REFERENCE
CPACK_CONAN_<compName>_PACKAGE_REFERENCE

The user/channel of the generated package. See Conan export-pkg command for more information.

  • Mandatory : NO
  • Default : None

CPACK_CONAN_EXTERNAL_PRE_PACKAGE_SCRIPT

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

CPACK_CONAN_EXTERNAL_POST_PACKAGE_SCRIPT

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

About

CPack wrapper for Conan to create C and C++ packages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages