From 59873f328ec76c6e6152025de83346358d1f3e68 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Wed, 26 Apr 2023 12:28:20 +0200 Subject: [PATCH 1/2] soci: fix linking against dependencies with conanv1 soci searches for POSTGRESQL_LIBRARIES etc. instead of what conan defines (PostgreSQL_LIBRARIES). fixes #11628 --- recipes/soci/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/soci/all/conanfile.py b/recipes/soci/all/conanfile.py index 67c572d5ad86b..2f1464ff4edf1 100644 --- a/recipes/soci/all/conanfile.py +++ b/recipes/soci/all/conanfile.py @@ -126,6 +126,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): From abcdb8c8b69bd0cd4dcc82f2084ba509dd33fa85 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 27 Apr 2023 15:28:14 +0200 Subject: [PATCH 2/2] soci: fix @rpath on MacOS --- recipes/soci/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/soci/all/conanfile.py b/recipes/soci/all/conanfile.py index 2f1464ff4edf1..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