From f59bd4a8a686598f06f98fd57c2c43223eb66ee1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 8 Sep 2024 21:25:46 +0300 Subject: [PATCH] mysql-connector-cpp: disable bootstrap() in CMakeLists.txt --- recipes/mysql-connector-cpp/all/conanfile.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/recipes/mysql-connector-cpp/all/conanfile.py b/recipes/mysql-connector-cpp/all/conanfile.py index e9877dcbb4b24..49d18e8a2ab44 100644 --- a/recipes/mysql-connector-cpp/all/conanfile.py +++ b/recipes/mysql-connector-cpp/all/conanfile.py @@ -110,12 +110,10 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - if is_apple_os(self): - # The CMAKE_OSX_ARCHITECTURES value set by Conan seems to be having no effect for some reason. - # This is a workaround for that. - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "PROJECT(MySQL_CONCPP)", - f"PROJECT(MySQL_CONCPP)\n\nadd_compile_options(-arch {self.settings.arch})\n") + # Disable boostrap(), which is unnecessary and fragile with variables set by Conan + # https://github.com/mysql/mysql-connector-cpp/blob/9.0.0/CMakeLists.txt#L69-L71 + # https://github.com/mysql/mysql-connector-cpp/blob/9.0.0/cdk/cmake/bootstrap.cmake#L55 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "bootstrap()", "") def build(self): self._patch_sources() @@ -168,4 +166,4 @@ def package_info(self): if is_apple_os(self) or self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["resolv"]) if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.extend(["m", "pthread"]) \ No newline at end of file + self.cpp_info.system_libs.extend(["m", "pthread"])