From 7173bf1253ea4d44e3ed7e7e83d1c4769f28a69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Fri, 6 Sep 2024 15:01:44 +0200 Subject: [PATCH] Fix protobuf issues --------- Co-authored-by: PerseoGI --- recipes/mysql-connector-cpp/all/conanfile.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/recipes/mysql-connector-cpp/all/conanfile.py b/recipes/mysql-connector-cpp/all/conanfile.py index e199362b0f6c5..630493249280b 100644 --- a/recipes/mysql-connector-cpp/all/conanfile.py +++ b/recipes/mysql-connector-cpp/all/conanfile.py @@ -81,7 +81,7 @@ def layout(self): def _package_folder_dep(self, dep, scope="host"): if scope == "build": - self.dependencies.build[dep].package_folder.replace("\\", "/") + return self.dependencies.build[dep].package_folder.replace("\\", "/") return self.dependencies[dep].package_folder.replace("\\", "/") def _include_folder_dep(self, dep): @@ -132,15 +132,9 @@ def _patch_sources(self): "PROJECT(MySQL_CONCPP)", f"PROJECT(MySQL_CONCPP)\n{patch}", strict=False) - # Packages-Apple patches - for lb in ["lz4", 'zlib', 'protobuf', 'zstd']: - replace_in_file(self, os.path.join(self.source_folder, "cdk", "extra", lb, "CMakeLists.txt"), - "enable_pic()", - f"enable_pic()\n{patch}", - strict=False) # Protobuf patches - protobuf = "protobufd" if self.dependencies["protobuf"].settings.build_type == "Debug" else "protobuf" + protobuf = "protobufd" if self.dependencies.build["protobuf"].settings.build_type == "Debug" else "protobuf" # INFO: Disable protobuf-lite to use Conan protobuf targets instead replace_in_file(self, os.path.join(self.source_folder, "cdk", "cmake", "DepFindProtobuf.cmake"), "LIBRARY protobuf-lite pb_libprotobuf-lite", "") # INFO: Fix protobuf library name according to the build type