Catch2 does not work with the Conan "cmake_paths" generator
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
I'm trying to include Catch2 into one of my CMake projects that uses the Conan package manager, but using the `cmake_paths` generator it does not seem to generate `Catch2Config.cmake` as expected.
After using the `cmake_paths` generator for Conan, the call to `find_package(Catch2 REQUIRED)` fails because it cannot find `Catch2Config.cmake`. It seems like using the `find_package` generator Catch2 does not get properly installed and cannot be found by the build system.
```
1> [CMake] CMake Error at C:/Users/tjwro/Documents/GitHub/vcpkg/scripts/buildsystems/vcpkg.cmake:329 (_find_package):
1> [CMake] By not providing "FindCatch2.cmake" in CMAKE_MODULE_PATH this project has
1> [CMake] asked CMake to find a package configuration file provided by "Catch2", but
1> [CMake] CMake did not find one.
1> [CMake]
1> [CMake] Could not find a package configuration file provided by "Catch2" with any
1> [CMake] of the following names:
1> [CMake]
1> [CMake] Catch2Config.cmake
1> [CMake] catch2-config.cmake
```
I was able to get it to work using the `cmake_find_package_multi` generator, but I would prefer to use the `cmake_paths` generator since that is what I have been using for all of my other packages and having to use a different generator for just one makes things feel very inconsistent.
I also am not sure if using both `cmake_find_package_multi` and `cmake_paths` generators within the same project will cause conflicts.
**Expected behavior**
Catch2 should work with the `cmake_paths` generator
**Platform information:**
- OS: **Windows 10**
- Compiler+version: **Visual Studio 2019 16.9.0 Preview 1.0**
- Catch version: **v2.13.3**
Contributor guide
Assessment
This issue has not been assessed yet.