Skip to content

Commit

Permalink
Fix protobuf issues
Browse files Browse the repository at this point in the history
---------

Co-authored-by: PerseoGI <[email protected]>
  • Loading branch information
AbrilRBS and perseoGI committed Sep 6, 2024
1 parent 555b556 commit 7173bf1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions recipes/mysql-connector-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7173bf1

Please sign in to comment.