-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[question] Packaging fmtlib #121
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 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. |
As this might be a recurrent question, I have added this to the FAQ section of the wiki: https://github.com/conan-io/conan-center-index/wiki/FAQ#why-are-cmake-findconfig-files-and-pkg-config-files-not-packaged |
Thanks for clarification. While this approach definitely works, there might be some issues while migrating to it, I've got the following issue with gtest. I introduce it as following:
And got en error:
Using |
Yes, this is something we are aware of and recently introduced a new field for recipes to declare a different name that can be later used by those generators. In the case of the requirement of
The generator will pick that name and something like Check |
@danimtb Could you please elaborate your answer regarding config files? The technical reason why config files are disavowed is not clear to me from the FAQ or the text here. Could you maybe provide some links to past issues? |
@jargonzombies please take a look in conan-io/conan#6269 (comment) |
add xkbcommon
Why fmt recepie removes cmake directory?
conan-center-index/recipes/fmt/all/conanfile.py
Line 69 in a34458e
With
fmt/5.3.0@bincrafters/stable
I was able to usefind_package( fmt 5.3.0 REQUIRED )
in cmake. Trying to upgrade tofmt/6.0.0
breaks my cmake usage logic.So what is the idiomatic way to introduce fmtlib in one's cmake project now?
The text was updated successfully, but these errors were encountered: