Skip to content

Commit 122ab27

Browse files
committedNov 3, 2023
fixup! cmake: Build bitcoin_consensus library
1 parent 4e426e2 commit 122ab27

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed
 

‎src/CMakeLists.txt

+19-13
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,31 @@ add_subdirectory(univalue)
1313
add_subdirectory(util)
1414

1515

16+
# These sources are to be compiled with different compile definitions.
17+
set(bitcoin_consensus_sources
18+
${CMAKE_CURRENT_SOURCE_DIR}/arith_uint256.cpp
19+
${CMAKE_CURRENT_SOURCE_DIR}/consensus/merkle.cpp
20+
${CMAKE_CURRENT_SOURCE_DIR}/consensus/tx_check.cpp
21+
${CMAKE_CURRENT_SOURCE_DIR}/hash.cpp
22+
${CMAKE_CURRENT_SOURCE_DIR}/primitives/block.cpp
23+
${CMAKE_CURRENT_SOURCE_DIR}/primitives/transaction.cpp
24+
${CMAKE_CURRENT_SOURCE_DIR}/pubkey.cpp
25+
${CMAKE_CURRENT_SOURCE_DIR}/script/interpreter.cpp
26+
${CMAKE_CURRENT_SOURCE_DIR}/script/script.cpp
27+
${CMAKE_CURRENT_SOURCE_DIR}/script/script_error.cpp
28+
${CMAKE_CURRENT_SOURCE_DIR}/uint256.cpp
29+
${CMAKE_CURRENT_SOURCE_DIR}/util/strencodings.cpp
30+
)
31+
1632
# Stable, backwards-compatible consensus functionality
1733
# also exposed as a shared library and/or a static one.
18-
add_library(bitcoin_consensus OBJECT EXCLUDE_FROM_ALL
19-
arith_uint256.cpp
20-
consensus/merkle.cpp
21-
consensus/tx_check.cpp
22-
hash.cpp
23-
primitives/block.cpp
24-
primitives/transaction.cpp
25-
pubkey.cpp
26-
script/interpreter.cpp
27-
script/script.cpp
28-
script/script_error.cpp
29-
uint256.cpp
30-
util/strencodings.cpp
34+
add_library(bitcoin_consensus STATIC EXCLUDE_FROM_ALL
35+
${bitcoin_consensus_sources}
3136
)
3237
target_link_libraries(bitcoin_consensus
3338
PRIVATE
3439
core
40+
bitcoin_crypto
3541
secp256k1
3642
)
3743

0 commit comments

Comments
 (0)
Please sign in to comment.