diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a72e76e43e6..60ca3796a47 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -56,3 +56,24 @@ endforeach() set(CMAKE_EXPORT_COMPILE_COMMANDS OFF) add_subdirectory(secp256k1) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +# Stable, backwards-compatible consensus functionality. +add_library(bitcoin_consensus STATIC EXCLUDE_FROM_ALL + arith_uint256.cpp + consensus/merkle.cpp + consensus/tx_check.cpp + hash.cpp + primitives/block.cpp + primitives/transaction.cpp + pubkey.cpp + script/interpreter.cpp + script/script.cpp + script/script_error.cpp + uint256.cpp +) +target_link_libraries(bitcoin_consensus + PRIVATE + core_interface + bitcoin_crypto + secp256k1 +)