diff options
author | Thomas Winget <tewinget@gmail.com> | 2015-04-07 14:27:37 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2015-04-07 15:02:20 -0400 |
commit | 9519526224e02618313f5dff23de62923de55984 (patch) | |
tree | 8ed0f8116451bbecc3d00917722aecfe89b7e7c0 /external | |
parent | Merge upstream into blockchain (diff) | |
download | monero-9519526224e02618313f5dff23de62923de55984.tar.xz |
Only compile BerkeleyDB as an option in non-static
Diffstat (limited to 'external')
-rw-r--r-- | external/db_drivers/CMakeLists.txt | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/external/db_drivers/CMakeLists.txt b/external/db_drivers/CMakeLists.txt index b6865a037..99b3a20bf 100644 --- a/external/db_drivers/CMakeLists.txt +++ b/external/db_drivers/CMakeLists.txt @@ -34,24 +34,26 @@ set(LMDB_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/liblmdb${ARCH_WIDTH}" CACHE STRING set(LMDB_LIBRARY "lmdb" CACHE STRING "LMDB Library name") -find_package(BerkeleyDB) +if (NOT STATIC) + find_package(BerkeleyDB) -if(NOT BERKELEY_DB_LIBRARIES OR STATIC) - add_subdirectory(libdb) - message(STATUS "BerkeleyDB not found, building from src tree") + if(NOT BERKELEY_DB_LIBRARIES OR STATIC) + add_subdirectory(libdb) + message(STATUS "BerkeleyDB not found, building from src tree") - set(BDB_STATIC true CACHE BOOL "BDB Static flag") - set(BDB_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/libdb" CACHE STRING "BDB include path") - set(BDB_LIBRARY "db" CACHE STRING "BDB library name") -else() - message(STATUS "Found BerkeleyDB include (db.h) in ${BERKELEY_DB_INCLUDE_DIR}") - if(BERKELEY_DB_LIBRARIES) - message(STATUS "Found BerkeleyDB shared library") - set(BDB_STATIC false CACHE BOOL "BDB Static flag") - set(BDB_INCLUDE ${BERKELEY_DB_INCLUDE_DIR} CACHE STRING "BDB include path") - set(BDB_LIBRARY ${BERKELEY_DB_LIBRARIES} CACHE STRING "BDB library name") - set(BDB_LIBRARY_DIRS "" CACHE STRING "BDB Library dirs") + set(BDB_STATIC true CACHE BOOL "BDB Static flag") + set(BDB_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/libdb" CACHE STRING "BDB include path") + set(BDB_LIBRARY "db" CACHE STRING "BDB library name") else() - die("Found BerkeleyDB includes, but could not find BerkeleyDB library. Please make sure you have installed libdb and libdb-dev or the equivalent") + message(STATUS "Found BerkeleyDB include (db.h) in ${BERKELEY_DB_INCLUDE_DIR}") + if(BERKELEY_DB_LIBRARIES) + message(STATUS "Found BerkeleyDB shared library") + set(BDB_STATIC false CACHE BOOL "BDB Static flag") + set(BDB_INCLUDE ${BERKELEY_DB_INCLUDE_DIR} CACHE STRING "BDB include path") + set(BDB_LIBRARY ${BERKELEY_DB_LIBRARIES} CACHE STRING "BDB library name") + set(BDB_LIBRARY_DIRS "" CACHE STRING "BDB Library dirs") + 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() endif() |