mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
CMake wiring, minor cleanup, minor test addition
Make Cmake things aware of BerkeleyDB and BlockchainBDB Make the BlockchainDB unit tests aware of BlockchainBDB
This commit is contained in:
parent
1bc89398b4
commit
cade0da8f1
6 changed files with 37 additions and 2 deletions
5
external/CMakeLists.txt
vendored
5
external/CMakeLists.txt
vendored
|
@ -103,3 +103,8 @@ set(LMDB_STATIC ${LMDB_STATIC} PARENT_SCOPE)
|
|||
set(LMDB_INCLUDE ${LMDB_INCLUDE} PARENT_SCOPE)
|
||||
set(LMDB_LIBRARY ${LMDB_LIBRARY} PARENT_SCOPE)
|
||||
set(LMDB_LIBRARY_DIRS ${LMDB_LIBRARY_DIRS} PARENT_SCOPE)
|
||||
|
||||
set(BDB_STATIC ${BDB_STATIC} PARENT_SCOPE)
|
||||
set(BDB_INCLUDE ${BDB_INCLUDE} PARENT_SCOPE)
|
||||
set(BDB_LIBRARY ${BDB_LIBRARY} PARENT_SCOPE)
|
||||
set(BDB_LIBRARY_DIRS ${BDB_LIBRARY_DIRS} PARENT_SCOPE)
|
||||
|
|
24
external/db_drivers/CMakeLists.txt
vendored
24
external/db_drivers/CMakeLists.txt
vendored
|
@ -44,6 +44,28 @@ else()
|
|||
set(LMDB_LIBRARY ${LMDB_LIBRARIES} PARENT_SCOPE)
|
||||
set(LMDB_LIBRARY_DIRS "" PARENT_SCOPE)
|
||||
else()
|
||||
die("Found liblmdb includes, but could not find liblmdb library. Please make sure you have installed liblmdb or liblmdb-dev or the equivalent")
|
||||
die("Found liblmdb includes, but could not find liblmdb library. Please make sure you have installed liblmdb and liblmdb-dev or the equivalent")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(BerkeleyDB)
|
||||
|
||||
if(NOT DB_LIBRARIES OR STATIC)
|
||||
add_subdirectory(libdb)
|
||||
message(STATUS "BerkeleyDB not found, building from src tree")
|
||||
|
||||
set(BDB_STATIC true PARENT_SCOPE)
|
||||
set(BDB_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/libdb" PARENT_SCOPE)
|
||||
set(BDB_LIBRARY "db" PARENT_SCOPE)
|
||||
else()
|
||||
message(STATUS "Found BerkeleyDB include (db.h) in ${DB_INCLUDE_DIR}")
|
||||
if(DB_LIBRARIES)
|
||||
message(STATUS "Found BerkeleyDB shared library")
|
||||
set(BDB_STATIC false PARENT_SCOPE)
|
||||
set(BDB_INCLUDE ${DB_INCLUDE_DIR} PARENT_SCOPE)
|
||||
set(BDB_LIBRARY ${DB_LIBRARIES} PARENT_SCOPE)
|
||||
set(BDB_LIBRARY_DIRS "" PARENT_SCOPE)
|
||||
else()
|
||||
die("Found BerkeleyDB includes, but could not find BerkeleyDB library. Please make sure you have installed libdb and libdb-dev or the equivalent")
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue