From afc7af4ab9bc7e2093ca5875c09e011f725f460b Mon Sep 17 00:00:00 2001 From: John Freeman Date: Thu, 19 Feb 2026 20:50:47 +0900 Subject: [PATCH] Fix compatibility with Conan 2.x: (#5001) Closes #4926, #4990 --- BUILD.md | 9 ++++++--- conanfile.py | 21 ++++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/BUILD.md b/BUILD.md index 490e1aa0c..ef3efa9ac 100644 --- a/BUILD.md +++ b/BUILD.md @@ -166,7 +166,10 @@ Export our [Conan recipe for RocksDB](./external/rocksdb). It does not override paths to dependencies when building with Visual Studio. ``` + # Conan 1.x conan export external/rocksdb rocksdb/6.29.5@ + # Conan 2.x + conan export --version 6.29.5 external/rocksdb ``` Export our [Conan recipe for SOCI](./external/soci). @@ -217,13 +220,13 @@ It patches their CMake to correctly import its dependencies. generated by the first. You can pass the build type on the command line with `--settings build_type=$BUILD_TYPE` or in the profile itself, under the section `[settings]` with the key `build_type`. - + If you are using a Microsoft Visual C++ compiler, then you will need to ensure consistency between the `build_type` setting and the `compiler.runtime` setting. - + When `build_type` is `Release`, `compiler.runtime` should be `MT`. - + When `build_type` is `Debug`, `compiler.runtime` should be `MTd`. ``` diff --git a/conanfile.py b/conanfile.py index 1ab94b46b..c1dc54b38 100644 --- a/conanfile.py +++ b/conanfile.py @@ -29,7 +29,6 @@ class Xrpl(ConanFile): 'date/3.0.3', 'grpc/1.50.1', 'libarchive/3.6.2', - 'lz4/1.9.4', 'nudb/2.0.8', 'openssl/3.6.0', 'soci/4.0.3@xahaud/stable', @@ -120,6 +119,7 @@ class Xrpl(ConanFile): self.requires('snappy/1.1.10@xahaud/stable', override=True) # Force boost version for all dependencies to avoid conflicts self.requires('boost/1.86.0', override=True) + self.requires('lz4/1.9.4', force=True) if self.options.with_wasmedge: self.requires('wasmedge/0.11.2@xahaud/stable') @@ -132,7 +132,12 @@ class Xrpl(ConanFile): self.requires('rocksdb/6.29.5') exports_sources = ( - 'CMakeLists.txt', 'Builds/*', 'bin/getRippledInfo', 'src/*', 'cfg/*', 'external/*' + 'CMakeLists.txt', + 'Builds/*', + 'bin/getRippledInfo', + 'cfg/*' + 'external/*', + 'src/*', ) def layout(self): @@ -179,8 +184,18 @@ class Xrpl(ConanFile): libxrpl.includedirs = ['include', 'include/ripple/proto'] libxrpl.requires = [ 'boost::boost', - 'openssl::crypto', 'date::date', 'grpc::grpc++', + 'libarchive::libarchive', + 'lz4::lz4', + 'nudb::nudb', + 'openssl::crypto', + 'protobuf::libprotobuf', + 'snappy::snappy', + 'soci::soci', + 'sqlite3::sqlite', 'xxhash::xxhash', + 'zlib::zlib', ] + if self.options.rocksdb: + libxrpl.requires.append('rocksdb::librocksdb')