diff --git a/recipes/secp256k1/all/conanfile.py b/recipes/secp256k1/all/conanfile.py index 2606c1fb86e27..dc0e476691236 100644 --- a/recipes/secp256k1/all/conanfile.py +++ b/recipes/secp256k1/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile, tools from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import get +from conan.tools.files import get, copy +import os required_conan_version = ">=2.0.0" @@ -44,6 +45,17 @@ def package(self): cmake = CMake(self) cmake.install() + # These headers are used by XRPLF/mpt-crypto which is why we need to package them. + src_headers = ["util.h", "int128.h", "int128_impl.h", "scalar.h", "scalar_impl.h"] + src_headers_dependencies = ["checkmem.h", "int128_native.h", "int128_native_impl.h", "scalar_4x64.h", "scalar_4x64_impl.h", "modinv64.h", "modinv64_impl.h"] + for header in src_headers + src_headers_dependencies: + copy( + self, + header, + src=os.path.join(self.source_folder, "src"), + dst=os.path.join(self.package_folder, "include", "private") + ) + def package_info(self): self.cpp_info.libs = ["secp256k1"] self.cpp_info.set_property("cmake_file_name", "secp256k1")