Require BerkeleyDB to be installed (for now) if building non-static

This commit is contained in:
Thomas Winget 2015-04-22 01:51:14 -04:00
parent 41f0a8fe4d
commit bed2331904
No known key found for this signature in database
GPG Key ID: 58131A160789E630
1 changed files with 2 additions and 7 deletions

View File

@ -37,13 +37,8 @@ set(LMDB_LIBRARY "lmdb" CACHE STRING "LMDB Library name")
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")
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")
if(NOT BERKELEY_DB_LIBRARIES)
die("BerkeleyDB not found. At this time it should be installed in your system for a non-static build.")
else()
message(STATUS "Found BerkeleyDB include (db.h) in ${BERKELEY_DB_INCLUDE_DIR}")
if(BERKELEY_DB_LIBRARIES)