Skip to content

Commit

Permalink
Fix protobuf v1 pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
husitawi committed Sep 5, 2024
1 parent d2bd6b1 commit bf241eb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions recipes/mysql-connector-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ def generate(self):
tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared
# Disable Boost, only legacy JDBC connector needs it
tc.cache_variables["BOOST_DIR"] = "FALSE"
# Compiler patches
if self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libc++":
raise ConanInvalidConfiguration(f"{self.ref} clang compiler requires -s compiler.libcxx=libstdc++")

# Windows patches
if self.settings.os == "Windows":
Expand Down Expand Up @@ -152,6 +149,13 @@ def _patch_sources(self):
"PRIVATE cdk_foundation ZLIB::ZLIB ext::lz4 ext::zstd",
strict=False)

# Protobuf patches
replace_in_file(self, os.path.join(self.source_folder, "cdk", "protocol", "mysqlx", "CMakeLists.txt"),
"target_link_libraries(cdk_proto_mysqlx",
"target_link_libraries(cdk_proto_mysqlx PRIVATE ext::protobuf)\n"\
"target_link_libraries(cdk_proto_mysqlx",
strict=False)

# Apple patches
if is_apple_os(self) and cross_building(self):
patch = f"set(CMAKE_OSX_ARCHITECTURES \"{self.settings.arch}\" CACHE INTERNAL \"\" FORCE)\n"
Expand Down

0 comments on commit bf241eb

Please sign in to comment.