conanfile: fix cmake_target_name of Catch2::Catch2.

The "Catch2 without default main" target is currently unspecified in
Conan, and defaults to catch2::catch2base. This commit switches it back
to Catch2::Catch2, as specified in the docs.
This commit is contained in:
Vincent Saulue-Laborde 2024-04-18 19:19:09 +02:00 committed by Martin Hořeňovský
parent f2320724a7
commit df04df94db

View File

@ -116,6 +116,7 @@ class CatchConan(ConanFile):
# Catch2
self.cpp_info.components["catch2base"].set_property("cmake_file_name", "Catch2::Catch2")
self.cpp_info.components["catch2base"].set_property("cmake_target_name", "Catch2::Catch2")
self.cpp_info.components["catch2base"].set_property("pkg_config_name", "catch2")
self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix]
self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2")