question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Packaging fmtlib

See original GitHub issue

Why fmt recepie removes cmake directory?

https://github.com/conan-io/conan-center-index/blob/a34458e886d2b5c1d0e3a091a559d281644631d5/recipes/fmt/all/conanfile.py#L69

With fmt/5.3.0@bincrafters/stable I was able to use find_package( fmt 5.3.0 REQUIRED ) in cmake. Trying to upgrade to fmt/6.0.0 breaks my cmake usage logic.

So what is the idiomatic way to introduce fmtlib in one’s cmake project now?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
danimtbcommented, Sep 27, 2019

We know that using find_package and relying on the CMake behavior to find the dependencies is something that should be avoided in favor of the information provided by the package manager.

Conan has an abstraction over the packages build system and description by using generators. Those generators translate the information of the dependency graph and create a suitable file that can be consumed by your build system.

In the past, we have found that the logic of some of the find and config files lead to broken scenarios with other dependencies and hardcoded paths that would make the package broken when shared and consumed.

Thus, we think that Conan already provides ways to consume those packages in the same way by using cmake_find_package generator: https://docs.conan.io/en/latest/reference/generators/cmake_find_package.html That way all the information is consistent in the graph and you also point to the exact dependency package you want to use.

Please take a look at the integrations section to learn how to use it: https://docs.conan.io/en/latest/integrations/build_system/cmake/cmake_find_package_generator.html

Finally, by not allowing these files (and others such as pkg-config) we make packages agnostic to the consumer as the logic of those files is not in the package but in the way the consumer wants the information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fmtlib package : Ubuntu - Launchpad
fmtlib package in Ubuntu. libfmt-dev: fast type-safe C++ formatting library -- development files ... This package has 1 new bug and 0 open...
Read more >
dev-libs/libfmt - Gentoo Packages
Gentoo Packages Database. ... Small, safe and fast formatting library. https://github.com/fmtlib/fmt · Overview Dependencies QA report Pull requests 0 Bugs ...
Read more >
How do you use C++ fmt on CentOS9? - Stack Overflow
You need both packages to compile the code that uses the library. The devel package specifies a dependency on the main package, so...
Read more >
C++ fmt library installation is not working - Ask Ubuntu
Most packages and libs don't need to be manually downloaded and installed on Ubuntu. You can install libfmt-dev using the somewhat official ...
Read more >
Ubuntu – Details of package libfmt-dev in bionic
[ Source: fmtlib ]. Package: libfmt-dev (4.0.0+ds-2) [universe] ... Please consider filing a bug or asking a question via Launchpad before contacting the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found