CMakeLists.txt raw
1 # Copyright (c) 2023-present The Limenka developers
2 # Distributed under the MIT software license, see the accompanying
3 # file COPYING or https://opensource.org/license/mit/.
4
5 # Wallet functionality used by limenkad and limenka-wallet executables.
6 add_library(limenka_wallet STATIC EXCLUDE_FROM_ALL
7 coincontrol.cpp
8 coinselection.cpp
9 ct.cpp
10 context.cpp
11 crypter.cpp
12 db.cpp
13 dump.cpp
14 external_signer_scriptpubkeyman.cpp
15 feebumper.cpp
16 fees.cpp
17 interfaces.cpp
18 load.cpp
19 migrate.cpp
20 receive.cpp
21 rpc/addresses.cpp
22 rpc/ct.cpp
23 rpc/backup.cpp
24 rpc/coins.cpp
25 rpc/encrypt.cpp
26 rpc/signmessage.cpp
27 rpc/spend.cpp
28 rpc/transactions.cpp
29 rpc/util.cpp
30 rpc/wallet.cpp
31 scriptpubkeyman.cpp
32 spend.cpp
33 transaction.cpp
34 wallet.cpp
35 walletdb.cpp
36 walletutil.cpp
37 )
38 target_link_libraries(limenka_wallet
39 PRIVATE
40 core_interface
41 limenka_common
42 univalue
43 Boost::headers
44 $<TARGET_NAME_IF_EXISTS:USDT::headers>
45 )
46
47 if(NOT USE_SQLITE AND NOT USE_BDB)
48 message(FATAL_ERROR "Wallet functionality requested but no BDB or SQLite support available.")
49 endif()
50 if(USE_SQLITE)
51 target_sources(limenka_wallet PRIVATE sqlite.cpp)
52 target_link_libraries(limenka_wallet
53 PRIVATE
54 $<TARGET_NAME_IF_EXISTS:unofficial::sqlite3::sqlite3>
55 $<TARGET_NAME_IF_EXISTS:SQLite::SQLite3>
56 )
57 endif()
58 if(USE_BDB)
59 target_sources(limenka_wallet PRIVATE bdb.cpp salvage.cpp)
60 target_link_libraries(limenka_wallet PUBLIC BerkeleyDB::BerkeleyDB)
61 endif()
62