Skip to content

Commit

Permalink
Added info about component_version field. Fixed some bad explanations (
Browse files Browse the repository at this point in the history
  • Loading branch information
franramirez688 committed Mar 4, 2022
1 parent e78526b commit 183bef4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions conan_v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ Properties related to *pkg_config*, supported by both legacy :ref:`pkg_config<pk
- **pkg_config_name** property equivalent to the ``names`` attribute.
- **pkg_config_custom_content** property supported by both generators that will add user
defined content to the *.pc* files created by the generator
- **component_version** property supported by both generators that sets a custom version to be used
in the ``Version`` field belonging to the created ``*.pc`` file for that component.
Properties related to *pkg_config*, only supported by new :ref:`PkgConfigDeps<PkgConfigDeps>`:
Expand Down
7 changes: 4 additions & 3 deletions reference/conanfile/tools/gnu/pkgconfigdeps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ Properties

The following properties affect the ``PkgConfigDeps`` generator:

- **pkg_config_name** property sets the ``names`` property for *pkg_config* generator.
- **pkg_config_name** property will define the name of the generated ``*.pc`` file (``xxxxx.pc``)
- **pkg_config_aliases** property sets some aliases of any package/component name for *pkg_config* generator. This property only accepts list-like Python objects.
- **pkg_config_custom_content** property supported by the *pkg_config* generator that will add user
defined content to the *.pc* files created by this generator.
- **pkg_config_custom_content** property will add user defined content to the *.pc* files created by this generator.
- **component_version** property sets a custom version to be used in the ``Version`` field belonging to the created ``*.pc`` file for that component.

These properties can be defined at global ``cpp_info`` level or at component level.

Expand All @@ -120,6 +120,7 @@ Example:
self.cpp_info.set_property("pkg_config_name", "myname")
self.cpp_info.components["mycomponent"].set_property("pkg_config_name", "componentname")
self.cpp_info.components["mycomponent"].set_property("pkg_config_aliases", ["alias1", "alias2"])
self.cpp_info.components["mycomponent"].set_property("component_version", "1.14.12")
Names and aliases
Expand Down
10 changes: 10 additions & 0 deletions reference/generators/pkg_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ the propagation of flags coming from the components *<COMP-NAME>.pc* files.

Go to :ref:`Integrations/pkg-config and pc files/Use the pkg_config generator<pkg_config_generator_example>`
if you want to learn how to use this generator.


Properties
++++++++++

The following properties affect the ``pkg_config`` generator:

- **pkg_config_name** property equivalent to the ``names`` attribute.
- **pkg_config_custom_content** property will add user defined content to the *.pc* files created by this generator.
- **component_version** property sets a custom version to be used in the ``Version`` field belonging to the created ``*.pc`` file for that component.

0 comments on commit 183bef4

Please sign in to comment.