Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for MakeDeps #3364

Open
wants to merge 5 commits into
base: release/2.0
Choose a base branch
from

Conversation

uilianries
Copy link
Member

Add a new section using the Examples2 with MakeDeps

Related to the PR conan-io/examples2#115

Current view:

Screenshot 2023-09-07 at 14-19-29 Build a project using Makefile with Conan MakeDeps — conan 2 0 10 documentation

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
return EXIT_SUCCESS;
}

The *Makefile* specifies that ``logger`` is the expected executable and that it should be linked to the ``spdlog`` and ``fmt`` libraries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this comes from copy&paste from other example? I can't see anything about fmt or spdlog there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a copy and paste indeed, but spdlog and fmt is correct. The spdlog depends on fmt:

% conan graph build-order --requires=spdlog/1.12.0

======== Computing dependency graph ========
Graph root
    cli
Requirements
    fmt/10.1.0#51d8d1db43672712db81b146a85ca73d - Cache
    spdlog/1.12.0#248c215bc5f0718402fbf1de126ef847 - Cache

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is that there's nothing in the Makefile about fmt or spdlog, it's a bit confusing for me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czoido I just updated the statement for global variables. Then, mentioned about separated variables.

In this case, we will use :ref:`MakeDeps<conan_tools_gnu_makedeps>` to generate information about where the **spdlog** library
files are installed thanks to the `makedeps.mk` file and using a `conanbuild[.sh|.bat]` file that describes the compilation environment.

We will use Conan to install **spdlog** library, generate a dependency file for Makefile, for find **spdlog** and **fmt** by make.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed all references about fmt as it's not out main dependency.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants