ElementsProject / libwally-core

Useful primitives for wallets
Other
280 stars 134 forks source link

build-system: compile libsecp and wallycore with cmake #401

Closed lightyear15 closed 1 year ago

lightyear15 commented 1 year ago

Extending cmake to compile wallycore source files into a native library

This commit also introduces a first draft of the install process where wallycore library and include files are installed together with the libsecp256k1 ones.

cmake target files are also installed, so users can import wallycore library using cmake's find_package tools. As libsecp256k1 is an automake-based project we massage its .pc to fit the cmake install process In cmake language, users can now do

find_package(wallycore COMPONENTS wallycore libsecp256k1)

and then target the libraries as

target_link_libraries(<myproject> [PRIVATE|PUBLIC]
    wallycore::wallycore
    wallycore::libsecp256k1
)

FYI: @k-matsuzawa