diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-03-02 11:55:58 +0200 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2015-03-17 18:25:28 -0400 |
commit | 0e8bbdb0bddd35d7dfbec5941189203d5897bb99 (patch) | |
tree | 0188d1df43fb133c5bf96432dac4ee89c16128aa /db_drivers/CMakeLists.txt | |
parent | Revert "Moved db_drivers/ into external/ for consistency" (diff) | |
download | monero-0e8bbdb0bddd35d7dfbec5941189203d5897bb99.tar.xz |
32-bit LMDB, removed check for in-system LMDB as it is consensus-critical
Diffstat (limited to '')
-rw-r--r-- | db_drivers/CMakeLists.txt | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/db_drivers/CMakeLists.txt b/db_drivers/CMakeLists.txt index 5993ed3a2..db386c11f 100644 --- a/db_drivers/CMakeLists.txt +++ b/db_drivers/CMakeLists.txt @@ -26,24 +26,16 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -find_package(LMDB) - -if(NOT LMDB_LIBRARIES OR STATIC) +# We aren't even going to check the system for an installed LMDB driver, as it is too +# critical a consensus component to rely on dynamically linked libraries +if(CMAKE_SIZEOF_VOID_P EQUAL "8") + message(STATUS "Using 64-bit LMDB from source tree") add_subdirectory(liblmdb) - message(STATUS "lmdb not found, building from src tree") - - set(LMDB_STATIC true PARENT_SCOPE) set(LMDB_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/liblmdb" PARENT_SCOPE) - set(LMDB_LIBRARY "lmdb" PARENT_SCOPE) else() - message(STATUS "Found liblmdb include (lmdb.h) in ${LMDB_INCLUDE_DIR}") - if(LMDB_LIBRARIES) - message(STATUS "Found liblmdb shared library") - set(LMDB_STATIC false PARENT_SCOPE) - set(LMDB_INCLUDE ${LMDB_INCLUDE_DIR} PARENT_SCOPE) - 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") - endif() + message(STATUS "Using 32-bit LMDB from source tree") + add_subdirectory(liblmdb-vl32) + set(LMDB_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/liblmdb-vl32" PARENT_SCOPE) endif() + +set(LMDB_LIBRARY "lmdb" PARENT_SCOPE) |