-
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] Mimicking CMake Find Modules #419
Comments
Other packages have the same problem:
|
I've created a PR for adding the variables for |
As we were discussing here, sometimes it would be better not to provide all the CMake variables if they are not consistent, it can be better to patch the build scripts of the consumers (and work to improve the C++ ecosystem). Other variables could go in the |
I wish education would be enough, but on the other hand I have to redefine the exact same variable in the CMake wrapper whenever I package a new library that uses HDF5 through CMake and can't just rely on |
Imho, the The recipes created by this repo are targeted to the complete conan community, not only us (=packagers). |
agree, currently we build with conan for development and with yocto for production (regulated industries...) actually its not only the imported targets ala
those smaller |
I've opened a RFC at conan-io/conan#6587 |
I agree, and would like to add that using Conan for development but not for production is going to be a very common use case. For example, I don't foresee that any of the big Linux distros are going to adopt Conan for dependency management in the near future, so anyone who wants their software to be distributed with Debian, Red Hat, etc. are going to be in this situation. Any deviation from the CMake-bundled |
Linking here this issue (conan-io/conan#7254), we will be adding to |
And finally this one: conan-io/conan#7261, it should be possible to make any adjustments needed. Anyone is missing something? |
qt (since 5.15.0) creates targets both in Qt5 and Qt namespace : https://doc.qt.io/qt-5/cmake-get-started.html#imported-library-targets. I guess this is not possible to mimic this yet ? |
This is already solved by the generator CMakeDeps. |
When creating a package that already exists in standard CMake Find Modules it is advised to have a
cpp_info.name
corresponding to the name expected by the equivalent call tofind_package
to make sure that thecmake_find_package*
generators work smoothly.However some of these standard CMake recipes provide more CMake variables than those provided by the Conan generators, and libraries using them through
find_package
tend to make use of these additional variables. The example I had in mind wasHDF5
for which I added a recipe to conan-center-index a few weeks ago: it provides more CMake variables that the bare minimum such asHDF5_HL_LIBRARIES
orHDF5_IS_PARALLEL
.When adding recipes to conan-center-index for such packages that already standard in CMake, should we also provide those additional variables through
cpp_info.build_modules
to make sure that thecmake_*
generators work with already existing projects in the wild to the best of our ability?The text was updated successfully, but these errors were encountered: