# find\_package can't find Find\<lib\>.cmake

**URL:** https://discourse.cmake.org/t/find-package-cant-find-find-lib-cmake/5673
**Category:** Usage
**Created:** [May 16, 2022, 3:28pm UTC](https://discourse.cmake.org/t/find-package-cant-find-find-lib-cmake/5673 "2022-05-16T15:28:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Rince](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@Rince](https://discourse.cmake.org/u/Rince)
#### Post date: [May 16, 2022, 3:28pm UTC](https://discourse.cmake.org/t/find-package-cant-find-find-lib-cmake/5673/1 "2022-05-16T15:28:45Z")

</div>

I get the following error for a dependency fetched by Conan:

```auto
CMake Error at /home/rince/MyApp/CMakeLists.txt:19 (find_package):
  By not providing "Findyaml-cpp.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "yaml-cpp",
  but CMake did not find one.

```

The `Findyaml-cpp.cmake` file is in the `conan-dependencies` directory, which I tried to set with various variables, including `CMAKE_MODULE_PATH`. I turned on the option CMAKE\_FIND\_DEBUG\_MODE, and now I get the following earlier in the output:

```auto
CMake Debug Log at /home/MyApp/CMakeLists.txt:19 (find_package):
  find_package considered the following paths for yaml-cpp.cmake

    /usr/share/cmake-3.22/Modules/Findyaml-cpp.cmake

  The file was found at

    conan-dependencies/Findyaml-cpp.cmake

```

But I still get the error later in the output. So, it seems that CMake is able to find the file, but then later it gives an error message that the file can’t be found?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 16, 2022, 3:49pm UTC](https://discourse.cmake.org/t/find-package-cant-find-find-lib-cmake/5673/2 "2022-05-16T15:49:38Z")

</div>

You can use `--debug-find` to get a trace of what’s going on here.

---

<div class="post-metadata">

### Author: ![Rince](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@Rince](https://discourse.cmake.org/u/Rince)
#### Post date: [May 17, 2022, 7:28am UTC](https://discourse.cmake.org/t/find-package-cant-find-find-lib-cmake/5673/3 "2022-05-17T07:28:04Z")

</div>

The output looks the same as with the `CMAKE_FIND_DEBUG_MODE` option turned on.

I still get the output:

```auto
CMake Debug Log at /home/rince/MyApp/CMakeLists.txt:19 (find_package):
  find_package considered the following paths for yaml-cpp.cmake

    /usr/share/cmake-3.22/Modules/Findyaml-cpp.cmake
The file was found at

    conan-dependencies/Findyaml-cpp.cmake

```

And then later:

```auto
 By not providing "Findyaml-cpp.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "yaml-cpp",
  but CMake did not find one.

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 17, 2022, 11:08am UTC](https://discourse.cmake.org/t/find-package-cant-find-find-lib-cmake/5673/4 "2022-05-17T11:08:24Z")

</div>

It says the file was found under `conan-dependencies`. I suspect there is some missing context between these that is relevant. Can you please provide the full output?
