Skip to content

Commit fcc2b76

Browse files
authored
Do not use cmake_file_name twice (#4269)
Signed-off-by: Uilian Ries <uilianr@jfrog.com>
1 parent 27bf3ce commit fcc2b76

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

reference/conanfile/methods/package_info.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Directories:
6868
.c, .cpp). By default it is empty. It might be used to store sources (for later debugging of packages, or to reuse those sources building
6969
them in other packages too).
7070
- **builddirs**: List of relative paths (starting from package root) of directories that can contain build scripts that could be used by the consumers. Empty by default.
71-
- **frameworkdirs**: List of relative paths (starting from the package root), of directories containing OSX frameworks.
71+
- **frameworkdirs**: List of relative paths (starting from the package root), of directories containing OSX frameworks.
7272

7373
Flags:
7474

@@ -139,12 +139,14 @@ If your package is composed by more than one library, it is possible to declare
139139
.. code-block:: python
140140
141141
def package_info(self):
142-
self.cpp_info.components["crypto"].set_property("cmake_file_name", "Crypto")
142+
self.cpp_info.set_property("cmake_file_name", "OpenSSL")
143+
144+
self.cpp_info.components["crypto"].set_property("cmake_target_name", "OpenSSL::Crypto")
143145
self.cpp_info.components["crypto"].libs = ["libcrypto"]
144146
self.cpp_info.components["crypto"].defines = ["DEFINE_CRYPTO=1"]
145147
self.cpp_info.components["crypto"].requires = ["zlib::zlib"] # Depends on all components in zlib package
146148
147-
self.cpp_info.components["ssl"].set_property("cmake_file_name", "SSL")
149+
self.cpp_info.components["ssl"].set_property("cmake_target_name", "OpenSSL::SSL")
148150
self.cpp_info.components["ssl"].includedirs = ["include/headers_ssl"]
149151
self.cpp_info.components["ssl"].libs = ["libssl"]
150152
self.cpp_info.components["ssl"].requires = ["crypto",
@@ -190,7 +192,7 @@ Conan ``VirtualBuildEnv`` generator will be used by default in consumers, collec
190192
The ``VirtualRunEnv`` generator will also be used by default in consumers collecting the ``runenv_info`` from the "host" context creating the ``conanrun`` environment script, which can be explicitly used with ``self.run(<cmd>, env="conanrun")``.
191193
192194
193-
.. note::
195+
.. note::
194196
195197
**Best practices**
196198
@@ -338,5 +340,5 @@ and that by default ``self.generator_info`` is ``None``.
338340
339341
340342
.. seealso::
341-
343+
342344
See :ref:`the defining package information tutorial<tutorial_creating_define_package_info>` for more information.

0 commit comments

Comments
 (0)