@@ -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.
@@ -320,6 +329,10 @@ if(WERROR)
320
329
unset (werror_flag)
321
330
endif ()
322
331
332
+ if (BUILD_BITCOINCONSENSUS_LIB)
333
+ set (HAVE_CONSENSUS_LIB TRUE )
334
+ endif ()
335
+
323
336
find_package (Python3 3.9 COMPONENTS Interpreter)
324
337
set (PYTHON_COMMAND ${Python3_EXECUTABLE} )
325
338
@@ -340,6 +353,13 @@ message(" bitcoin-cli ......................... ${BUILD_CLI}")
340
353
message (" bitcoin-tx .......................... ${BUILD_TX} " )
341
354
message (" bitcoin-util ........................ ${BUILD_UTIL} " )
342
355
message (" bitcoin-wallet ...................... ${BUILD_WALLET_TOOL} " )
356
+ message ("Libraries:" )
357
+ if (BUILD_SHARED_LIBS )
358
+ message (" library type ........................ Shared" )
359
+ else ()
360
+ message (" library type ........................ Static" )
361
+ endif ()
362
+ message (" libbitcoinconsensus ................. ${BUILD_BITCOINCONSENSUS_LIB} " )
343
363
message ("Wallet support:" )
344
364
message (" SQLite, descriptor wallets .......... ${WITH_SQLITE} " )
345
365
message (" Berkeley DB, legacy wallets ......... ${WITH_BDB} " )
0 commit comments