Open pananton opened 4 years ago
@pananton Protobuf is a special case, it requires extra cmake file exported by the project: https://github.com/conan-io/conan-center-index/blob/959001e539c45e4750d9e9b98ecde5f9e7d38ef6/recipes/protobuf/all/conanfile.py#L98
That's why is used a different path to load those modules. Did you try cmake_find_package
too?
We strongly recommend you to use Conan generated files with cmake_find_package[_multi]
generator. You can read other use-cases and some rationale in the docs (https://github.com/conan-io/conan-center-index/wiki/FAQ#why-are-cmake-findconfig-files-and-pkg-config-files-not-packaged) and this issue.
and this issue.
Well, "this issue" is literally --this-- issue 😄
hahahaha, have a look to that issue then 🤦
(I've edited the comment above too)
Hello! I'm using conan protobuf/3.9.1 recipe in my project with cmake_paths generator. Here is one simple example of conan_paths.cmake:
I include this file to by project, but
find_package
fails. As you can see - cmake's variables used for searching package (CMAKE_MODULE_PATH and CMAKE_PREFIX_PATH) are not set to the root of protobuf directory and cmake's FindProtobuf module fails to do its job. If I manually set CMAKE_MODULEPATH to ```/root/.conan/data/protobuf/3.9.1//_/package/66c5327ebdcecae0a01a863939964495fa019a06``` then everything works fine as expected.The question is why conan sets those cmake variables to such values?