[question] Packaging fmtlib
See original GitHub issueWhy fmt recepie removes cmake directory?
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:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@jargonzombies please take a look in https://github.com/conan-io/conan/issues/6269#issuecomment-570182130