Conan-center-index: [question] spdlog - find_package

Created on 29 Oct 2019  路  3Comments  路  Source: conan-io/conan-center-index

https://github.com/conan-io/conan-center-index/blob/master/recipes/spdlog/1.4.x/conanfile.py#L85-L87

This removes the possibility to use find_package(spdlog 1.4.2 REQUIRED).
The bincrafters versions actually allows this. Is there any reason why it was changed this way?

question

Most helpful comment

as mentionned in https://docs.conan.io/en/latest/integrations/build_system/cmake/cmake_find_package_generator.html, if are trying to consume spdlog from a conanfile.py, just use generators = "cmake_find_package" and the CMake build helper will automatically adjust the CMAKE_MODULE_PATH. If you are using a conanfile.txt file, you need to use cmake_find_package and cmake_paths generators to adjust the CMAKE_MODULE_PATH and CMAKE_PREFIX_PATH variables automatically.

All 3 comments

Good point. But actually find_package is still not working (win10, VS) or do i have to edit CMAKE_MODULE_PATH manually?
Anyway iam unsure where the right place is, to discuss this.

as mentionned in https://docs.conan.io/en/latest/integrations/build_system/cmake/cmake_find_package_generator.html, if are trying to consume spdlog from a conanfile.py, just use generators = "cmake_find_package" and the CMake build helper will automatically adjust the CMAKE_MODULE_PATH. If you are using a conanfile.txt file, you need to use cmake_find_package and cmake_paths generators to adjust the CMAKE_MODULE_PATH and CMAKE_PREFIX_PATH variables automatically.

Was this page helpful?
0 / 5 - 0 ratings