Repository: catchorg/Catch2
File: conanfile.py (Python)

Code before:
        if conan_version < scm.Version("2.0.0"):
            self.cpp_info.names["cmake_find_package"] = "Catch2"
            self.cpp_info.names["cmake_find_package_multi"] = "Catch2"
            # Catch2
            self.cpp_info.components["catch2base"].names["cmake_find_package"] = "Catch2"
            self.cpp_info.components["catch2base"].names["cmake_find_package_multi"] = "Catch2"
            self.cpp_info.components["catch2base"].names["pkg_config"] = "Catch2"
            self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix]
            self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2")
            # Catch2WithMain
            self.cpp_info.components["catch2main"].names["cmake_find_package"] = "Catch2WithMain"
            self.cpp_info.components["catch2main"].names["cmake_find_package_multi"] = "Catch2WithMain"
            self.cpp_info.components["catch2main"].names["pkg_config"] = "Catch2WithMain"
            self.cpp_info.components["catch2main"].libs = ["Catch2Main" + lib_suffix]
            self.cpp_info.components["catch2main"].requires = ["catch2base"]
        else:
            self.cpp_info.set_property("cmake_file_name", "Catch2")

            # Catch2
            self.cpp_info.components["catch2base"].set_property("cmake_file_name", "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")

            # Catch2WithMain
            self.cpp_info.components["catch2main"].set_property("cmake_file_name", "Catch2WithMain")
            self.cpp_info.components["catch2main"].set_property("pkg_config_name", "Catch2WithMain")
            self.cpp_info.components["catch2main"].libs = ["Catch2Main" + lib_suffix]
            self.cpp_info.components["catch2main"].requires = ["catch2base"]

Review comment (suggestion):
Please do specify `cmake_target_name` similar to
https://github.com/conan-io/conan-center-index/blob/master/recipes/catch2/3.x.x/conanfile.py#L168

That way you would be able to correctly use `Catch2::Catch2WithMain` target instead of the lowercase. 

Code after:
        if conan_version < scm.Version("2.0.0"):
            self.cpp_info.names["cmake_find_package"] = "Catch2"
            self.cpp_info.names["cmake_find_package_multi"] = "Catch2"
            # Catch2
            self.cpp_info.components["catch2base"].names["cmake_find_package"] = "Catch2"
            self.cpp_info.components["catch2base"].names["cmake_find_package_multi"] = "Catch2"
            self.cpp_info.components["catch2base"].names["pkg_config"] = "catch2"
            self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix]
            self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2")
            # Catch2WithMain
            self.cpp_info.components["catch2main"].names["cmake_find_package"] = "Catch2WithMain"
            self.cpp_info.components["catch2main"].names["cmake_find_package_multi"] = "Catch2WithMain"
            self.cpp_info.components["catch2main"].names["pkg_config"] = "Catch2WithMain"
            self.cpp_info.components["catch2main"].libs = ["Catch2Main" + lib_suffix]
            self.cpp_info.components["catch2main"].requires = ["catch2base"]
        else:
            self.cpp_info.set_property("cmake_file_name", "Catch2")
            self.cpp_info.set_property("cmake_target_name", "Catch2::Catch2WithMain")
            self.cpp_info.set_property("pkg_config_name", "catch2-with-main")

            # Catch2
            self.cpp_info.components["catch2base"].set_property("cmake_file_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")

            # Catch2WithMain
            self.cpp_info.components["catch2main"].set_property("cmake_file_name", "Catch2::Catch2WithMain")
            self.cpp_info.components["catch2main"].set_property("cmake_target_name", "Catch2::Catch2WithMain")
            self.cpp_info.components["catch2main"].set_property("pkg_config_name", "catch2-with-main")
            self.cpp_info.components["catch2main"].libs = ["Catch2Main" + lib_suffix]
            self.cpp_info.components["catch2main"].requires = ["catch2base"]