From d33327e34480f58afe7d219004b4637a2f9fd597 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Sun, 30 Apr 2023 08:02:45 +0200 Subject: [PATCH] (#17245) soci: fix linking against dependencies with conanv1 * soci: fix linking against dependencies with conanv1 soci searches for POSTGRESQL_LIBRARIES etc. instead of what conan defines (PostgreSQL_LIBRARIES). fixes #11628 * soci: fix @rpath on MacOS --- recipes/soci/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/soci/all/conanfile.py b/recipes/soci/all/conanfile.py index 67c572d5ad86b..6b15a39df0e5f 100644 --- a/recipes/soci/all/conanfile.py +++ b/recipes/soci/all/conanfile.py @@ -110,6 +110,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + # MacOS @rpath + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.variables["SOCI_SHARED"] = self.options.shared tc.variables["SOCI_STATIC"] = not self.options.shared tc.variables["SOCI_TESTS"] = False @@ -126,6 +128,9 @@ def generate(self): tc.generate() deps = CMakeDeps(self) + deps.set_property("mysql", "cmake_file_name", "MYSQL") + deps.set_property("libpq", "cmake_file_name", "POSTGRESQL") + deps.set_property("sqlite3", "cmake_file_name", "SQLITE3") deps.generate() def build(self):