diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/blockchain_db/CMakeLists.txt | 13 | ||||
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/blockchain_db/CMakeLists.txt b/src/blockchain_db/CMakeLists.txt index 70b4c876c..adbe804aa 100644 --- a/src/blockchain_db/CMakeLists.txt +++ b/src/blockchain_db/CMakeLists.txt @@ -29,16 +29,29 @@ set(blockchain_db_sources blockchain_db.cpp lmdb/db_lmdb.cpp + ) + +if (NOT STATIC) + set(blockchain_db_sources + ${blockchain_db_sources} berkeleydb/db_bdb.cpp ) +endif() + set(blockchain_db_headers) set(blockchain_db_private_headers blockchain_db.h lmdb/db_lmdb.h + ) + +if (NOT STATIC) + set(blockchain_db_private_headers + ${blockchain_db_private_headers} berkeleydb/db_bdb.h ) +endif() bitmonero_private_headers(blockchain_db ${crypto_private_headers}) diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 7864b55c8..38c009ca8 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -46,7 +46,9 @@ using namespace epee; #include "cryptonote_core/checkpoints_create.h" #include "blockchain_db/blockchain_db.h" #include "blockchain_db/lmdb/db_lmdb.h" +#ifndef STATICLIB #include "blockchain_db/berkeleydb/db_bdb.h" +#endif DISABLE_VS_WARNINGS(4355) @@ -207,7 +209,12 @@ namespace cryptonote } else if (db_type == "berkeley") { +#ifndef STATICLIB db = new BlockchainBDB(); +#else + LOG_ERROR("BlockchainBDB not supported on STATIC builds"); + return false; +#endif } else { |