Skip to content

Commit

Permalink
cmakedeps_legacy (#3492)
Browse files Browse the repository at this point in the history
* cmakedeps_legacy

* Update reference/tools/cmake/cmakedeps.rst

Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>

---------

Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>
  • Loading branch information
memsharded and AbrilRBS authored Dec 19, 2023
1 parent f7688b5 commit 4762196
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reference/tools/cmake/cmakedeps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ Generated files
- **Other necessary *.cmake**: files like version, flags and directory data or configuration.


Note that it will also generate a **conandeps_legacy.cmake** file. This is a file that provides a behavior similar to the Conan 1 ``cmake`` generator, allowing to include this file with ``include(${CMAKE_BINARY_DIR}/generators/conandeps_legacy.cmake)``, and providing a single CMake ``CONANDEPS_LEGACY`` variable that allows to link with all the direct and transitive dependencies without explicitly enumerating them like: ``target_link_libraries(app ${CONANDEPS_LEGACY})``. This is a convenience provided for Conan 1.X users to upgrade to Conan 2.0 without changing their overall developer flow, but it is not recommended otherwise, and using the CMake canonical flow of explicitly using ``find_package()`` and ``target_link_libraries(... pkg1::pkg1 pkg2::pkg2)`` with targets is the correct approach.


Customization
-------------

Expand Down

0 comments on commit 4762196

Please sign in to comment.