@@ -8,6 +8,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
8
8
9
9
add_subdirectory (crypto )
10
10
add_subdirectory (univalue )
11
+ add_subdirectory (util )
11
12
12
13
13
14
# Stable, backwards-compatible consensus functionality
@@ -27,3 +28,165 @@ add_library(bitcoin_consensus OBJECT EXCLUDE_FROM_ALL
27
28
util/strencodings.cpp
28
29
)
29
30
target_link_libraries (bitcoin_consensus PRIVATE secp256k1 )
31
+
32
+
33
+ # Home for common functionality shared by different executables and libraries.
34
+ # Similar to `bitcoin_util` library, but higher-level.
35
+ add_library (bitcoin_common STATIC EXCLUDE_FROM_ALL
36
+ base58.cpp
37
+ bech32.cpp
38
+ chainparams.cpp
39
+ coins.cpp
40
+ common/bloom.cpp
41
+ common/interfaces.cpp
42
+ common/run_command.cpp
43
+ $< $< TARGET_EXISTS:PkgConfig::libevent> :common/url.cpp>
44
+ compressor.cpp
45
+ core_read.cpp
46
+ core_write.cpp
47
+ deploymentinfo.cpp
48
+ external_signer.cpp
49
+ init/common.cpp
50
+ key.cpp
51
+ key_io.cpp
52
+ merkleblock.cpp
53
+ net_types.cpp
54
+ netaddress.cpp
55
+ netbase.cpp
56
+ net_permissions.cpp
57
+ outputtype.cpp
58
+ policy /feerate.cpp
59
+ policy /policy.cpp
60
+ protocol.cpp
61
+ psbt.cpp
62
+ rpc/rawtransaction_util.cpp
63
+ rpc/request.cpp
64
+ rpc/external_signer.cpp
65
+ rpc/util.cpp
66
+ scheduler.cpp
67
+ script/descriptor.cpp
68
+ script/miniscript.cpp
69
+ script/sign.cpp
70
+ script/signingprovider.cpp
71
+ script/standard.cpp
72
+ warnings.cpp
73
+ )
74
+ target_link_libraries (bitcoin_common
75
+ PRIVATE
76
+ bitcoin_consensus
77
+ bitcoin_util
78
+ univalue
79
+ secp256k1
80
+ Boost::boost
81
+ $< TARGET_NAME_IF_EXISTS:PkgConfig::libevent>
82
+ )
83
+
84
+
85
+ # P2P and RPC server functionality used by `bitcoind` and `bitcoin-qt` executables.
86
+ add_library (bitcoin_node STATIC EXCLUDE_FROM_ALL
87
+ addrdb.cpp
88
+ addrman.cpp
89
+ banman.cpp
90
+ blockencodings.cpp
91
+ blockfilter.cpp
92
+ chain.cpp
93
+ consensus/tx_verify.cpp
94
+ dbwrapper.cpp
95
+ deploymentstatus.cpp
96
+ flatfile.cpp
97
+ headerssync.cpp
98
+ httprpc.cpp
99
+ httpserver.cpp
100
+ i2p.cpp
101
+ index/base.cpp
102
+ index/blockfilterindex.cpp
103
+ index/coinstatsindex.cpp
104
+ index/txindex.cpp
105
+ init.cpp
106
+ kernel/chain.cpp
107
+ kernel/checks.cpp
108
+ kernel/coinstats.cpp
109
+ kernel/context.cpp
110
+ kernel/cs_main.cpp
111
+ kernel/mempool_persist.cpp
112
+ mapport.cpp
113
+ net.cpp
114
+ netgroup.cpp
115
+ net_processing.cpp
116
+ node/blockstorage.cpp
117
+ node/caches.cpp
118
+ node/chainstate.cpp
119
+ node/chainstatemanager_args.cpp
120
+ node/coin.cpp
121
+ node/connection_types.cpp
122
+ node/context.cpp
123
+ node/eviction.cpp
124
+ node/interface_ui.cpp
125
+ node/interfaces.cpp
126
+ node/mempool_args.cpp
127
+ node/mempool_persist_args.cpp
128
+ node/miner.cpp
129
+ node/minisketchwrapper.cpp
130
+ node/psbt.cpp
131
+ node/transaction.cpp
132
+ node/txreconciliation.cpp
133
+ node/utxo_snapshot.cpp
134
+ node/validation_cache_args.cpp
135
+ noui.cpp
136
+ policy /fees.cpp
137
+ policy /fees_args.cpp
138
+ policy /packages.cpp
139
+ policy /rbf.cpp
140
+ policy /settings.cpp
141
+ pow.cpp
142
+ rest.cpp
143
+ rpc/blockchain.cpp
144
+ rpc/fees.cpp
145
+ rpc/mempool.cpp
146
+ rpc/mining.cpp
147
+ rpc/net.cpp
148
+ rpc/node.cpp
149
+ rpc/output_script.cpp
150
+ rpc/rawtransaction.cpp
151
+ rpc/server.cpp
152
+ rpc/server_util.cpp
153
+ rpc/signmessage.cpp
154
+ rpc/txoutproof.cpp
155
+ script/sigcache.cpp
156
+ shutdown.cpp
157
+ signet.cpp
158
+ timedata.cpp
159
+ torcontrol.cpp
160
+ txdb.cpp
161
+ txmempool.cpp
162
+ txorphanage.cpp
163
+ txrequest.cpp
164
+ validation.cpp
165
+ validationinterface.cpp
166
+ versionbits.cpp
167
+
168
+ dummywallet.cpp
169
+ )
170
+ target_link_libraries (bitcoin_node
171
+ PRIVATE
172
+ bitcoin_common
173
+ bitcoin_util
174
+ leveldb
175
+ minisketch
176
+ univalue
177
+ Boost::boost
178
+ $< $< NOT:$< PLATFORM_ID:Windows> > :PkgConfig::libevent_pthreads>
179
+ )
180
+
181
+
182
+ # Bitcoin Core bitcoind.
183
+ if (BUILD_DAEMON )
184
+ add_executable (bitcoind
185
+ bitcoind.cpp
186
+ init/bitcoind.cpp
187
+ )
188
+ target_link_libraries (bitcoind
189
+ PRIVATE
190
+ bitcoin_node
191
+ )
192
+ endif ()
0 commit comments