From df04df94dbe59efdb7496f3d9872f55cbc61bb24 Mon Sep 17 00:00:00 2001 From: Vincent Saulue-Laborde Date: Thu, 18 Apr 2024 19:19:09 +0200 Subject: [PATCH] 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. --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index bcdd426f..7a3ac7c3 100755 --- a/conanfile.py +++ b/conanfile.py @@ -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")