Skip to content

Commit

Permalink
add doc to cmakedeps listening to component_version property (#3399)
Browse files Browse the repository at this point in the history
* add doc to cmakedeps listening to component_version property

* some fixes

---------

Co-authored-by: czoido <mrgalleta@gmail.com>
  • Loading branch information
nicosmd and czoido authored Nov 7, 2023
1 parent 29b8fed commit 816bb1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions reference/tools/cmake/cmakedeps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ The following properties affect the CMakeDeps generator:
add this property to their *conanfile.py* files at root ``cpp_info`` level (components not supported for now).
- **nosoname**: boolean value that should be used only by dependencies that are defined as ``SHARED`` and represent a library built without the ``soname`` flag option.
- **cmake_config_version_compat**: (preview) By default ``SameMajorVersion``, it can take the values ``"AnyNewerVersion", "SameMajorVersion", "SameMinorVersion", "ExactVersion"``. It will use that policy in the generated ``<PackageName>ConfigVersion.cmake`` file
- **system_package_version**: version of the package used to generate the ``<PackageName>ConfigVersion.cmake`` file. Can be useful when creating system packages or other wrapper packages, where the conan package version is different to the eventually referenced package version to keep compatibility to ``find_package(<PackageName> <Version>)`` calls.


Example:
Expand Down
5 changes: 4 additions & 1 deletion reference/tools/gnu/pkgconfigdeps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ The following properties affect the ``PkgConfigDeps`` generator:
- **pkg_config_custom_content** property will add user defined content to the *.pc* files created by this generator as freeform variables.
That content can be a string or a dict-like Python object. Notice that the variables declared here will overwrite those ones already defined by Conan.
Click `here <https://people.freedesktop.org/~dbn/pkg-config-guide.html#concepts>`__ for more information about the type of variables in a ``*.pc`` file.
- **component_version** property sets a custom version to be used in the ``Version`` field belonging to the created ``*.pc`` file for that component.
- **system_package_version**: property sets a custom version to be used in the ``Version`` field belonging to the created ``*.pc`` file for the package.
- **component_version** property sets a custom version to be used in the ``Version`` field
belonging to the created ``*.pc`` file for that component (takes precedence over the
**system_package_version** property).

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

Expand Down

0 comments on commit 816bb1f

Please sign in to comment.