@@ -40,6 +40,7 @@ option(BUILD_DAEMON "Build bitcoind executable." ON)
40
40
option (BUILD_CLI "Build bitcoin-cli executable." ON )
41
41
option (BUILD_TX "Build bitcoin-tx executable." ON )
42
42
option (BUILD_UTIL "Build bitcoin-util executable." ON )
43
+ option (BUILD_BITCOINCONSENSUS_LIB "Build bitcoinconsensus library." ON )
43
44
option (ASM "Use assembly routines." ON )
44
45
45
46
option (ENABLE_WALLET "Enable wallet." ON )
@@ -95,9 +96,17 @@ unset(check_pie_output)
95
96
# It is intended to be a usage requirement for all other targets.
96
97
add_library (core INTERFACE )
97
98
99
+ # The lib interface library aims to encapsulate build flags, which
100
+ # are specific to non-internal libraries.
101
+ # It is intended to be a usage requirement for non-internal library
102
+ # targets.
103
+ add_library (lib INTERFACE )
104
+
98
105
include (TryAppendCXXFlags)
99
106
include (TryAppendLinkerFlag)
100
107
108
+ try_append_linker_flag("-Wl,--no-undefined" TARGET lib)
109
+
101
110
if (WIN32 )
102
111
#[=[
103
112
This build system supports two ways to build binaries for Windows.
@@ -306,6 +315,10 @@ if(WERROR)
306
315
unset (werror_flag)
307
316
endif ()
308
317
318
+ if (BUILD_BITCOINCONSENSUS_LIB)
319
+ set (HAVE_CONSENSUS_LIB TRUE )
320
+ endif ()
321
+
309
322
find_package (Python3 3.9 COMPONENTS Interpreter)
310
323
set (PYTHON_COMMAND ${Python3_EXECUTABLE} )
311
324
@@ -326,6 +339,13 @@ message(" bitcoin-cli ......................... ${BUILD_CLI}")
326
339
message (" bitcoin-tx .......................... ${BUILD_TX} " )
327
340
message (" bitcoin-util ........................ ${BUILD_UTIL} " )
328
341
message (" bitcoin-wallet ...................... ${BUILD_WALLET_TOOL} " )
342
+ message ("Libraries:" )
343
+ if (BUILD_SHARED_LIBS )
344
+ message (" library type ........................ Shared" )
345
+ else ()
346
+ message (" library type ........................ Static" )
347
+ endif ()
348
+ message (" libbitcoinconsensus ................. ${BUILD_BITCOINCONSENSUS_LIB} " )
329
349
message ("Wallet support:" )
330
350
message (" SQLite, descriptor wallets .......... ${WITH_SQLITE} " )
331
351
message (" Berkeley DB, legacy wallets ......... ${WITH_BDB} " )
0 commit comments