Skip to content

Commit 7b0a5c5

Browse files
committed
Properly package headers/library for mpt-crypto
1 parent f2a4734 commit 7b0a5c5

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

recipes/mpt-crypto/all/conanfile.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from conan import ConanFile, tools
22
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
3-
from conan.tools.files import get
3+
from conan.tools.files import copy, get
4+
import os
45

56
required_conan_version = ">=2.0.0"
67

@@ -52,8 +53,23 @@ def build(self):
5253
cmake.build()
5354

5455
def package(self):
55-
cmake = CMake(self)
56-
cmake.install()
56+
# Copy headers
57+
copy(
58+
self,
59+
"*.h",
60+
src=os.path.join(self.source_folder, "include"),
61+
dst=os.path.join(self.package_folder, "include"),
62+
keep_path=True,
63+
)
64+
# Copy library files
65+
for ext in ["*.a", "*.lib", "*.dylib", "*.so*", "*.dll"]:
66+
copy(
67+
self,
68+
ext,
69+
src=self.build_folder,
70+
dst=os.path.join(self.package_folder, "lib"),
71+
keep_path=False,
72+
)
5773

5874
def package_info(self):
5975
self.cpp_info.libs = ["mpt-crypto"]

recipes/secp256k1/all/conanfile.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ def build(self):
4242
cmake.build()
4343

4444
def package(self):
45-
cmake = CMake(self)
46-
cmake.install()
47-
4845
# These headers are used by XRPLF/mpt-crypto which is why we need to package them.
4946
src_headers = ["util.h", "int128.h", "int128_impl.h", "scalar.h", "scalar_impl.h"]
5047
src_headers_dependencies = ["checkmem.h", "int128_native.h", "int128_native_impl.h", "scalar_4x64.h", "scalar_4x64_impl.h", "modinv64.h", "modinv64_impl.h"]

0 commit comments

Comments
 (0)