[package] zlib/1.2.11: cmake find_package generates wrong filename
See original GitHub issuePackage and Environment Details (include every applicable attribute)
- Package Name/Version: zlib/1.2.11
- Conan version: conan 1.19.1
- Python version: Python 3.7.4
Conan profile
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]
Steps to reproduce (Include if Applicable)
Create conanfile.txt with contents:
[requires]
boost/1.71.0
[generators]
cmake_find_package
cmake_paths
CMakeLists.txt:
include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
find_package(boost REQUIRED)
Run
$ mkdir build && cd build
$ conan install ..
$ cmake ..
Expected: boost is found by CMake.
Actual:
By not providing "Findzlib.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "zlib", but
CMake did not find one.
I’m pretty sure this is the offending commit: https://github.com/conan-io/conan-center-index/commit/eda6295c4d5cfa725bf2f00a7dd15f35c306018c but I suspect there was a reason for making the change. If I rename FindZLIB.cmake
to Findzlib.cmake
, it finds the package successfully. This is because the generated Findboost.cmake
contains this line:
find_dependency(zlib REQUIRED)
cc @uilianries
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
find_package — CMake 3.25.1 Documentation
If the package configuration file cannot be found CMake will generate an error describing the problem unless the QUIET argument is specified.
Read more >CMake FIND_PACKAGE succeeds but returns wrong path
This problem occurs when using some older versions of boost with cmake-2.8.6-rc2 or later, where the boost package finding code was changed.
Read more >Creating your own projects using CMake - Open Babel
The filename of modules to find packages must start with Find. ... Next, calling find_package will execute the module to find openbabel and...
Read more >find_package(ZLIB) is not idempotent (#21343) · Issues - GitLab
cmake version 3.16.3 (on Debian Linux) cmake version 3.15.19101501-MSVC_2 (on Windows 10) It seems that find_package(ZLIB) is not idemponent ...
Read more >[Urgent] Error during catkin_make: can't find turtle_ros_3d
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file ...
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
@sztomi I believe this stability guarantee applies to the conan client itself. as for recipes I guess the policy is to be compatible with the latest release https://github.com/conan-io/conan-center-index/wiki
@sztomi was your question solved? Can we close this issue? thanks