From c4a32feb4813d66ad9f3d5f4f6dc708bc5ee00e3 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 20 Apr 2021 18:41:45 +0200 Subject: [PATCH] lmdb: Configure project to use lmdb and lmdb-safe --- libpkg/CMakeLists.txt | 14 ++++++++++++-- libpkg/lmdb-safe | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) create mode 120000 libpkg/lmdb-safe diff --git a/libpkg/CMakeLists.txt b/libpkg/CMakeLists.txt index 011e362..e72ea2c 100644 --- a/libpkg/CMakeLists.txt +++ b/libpkg/CMakeLists.txt @@ -12,7 +12,9 @@ set(HEADER_FILES parser/database.h parser/config.h parser/utils.h - parser/binary.h) + parser/binary.h + lmdb-safe/lmdb-safe.hh + lmdb-safe/lmdb-typed.hh) set(SRC_FILES data/package.cpp data/database.cpp @@ -27,7 +29,9 @@ set(SRC_FILES parser/config.cpp parser/utils.cpp parser/binary.cpp - parser/siglevel.cpp) + parser/siglevel.cpp + lmdb-safe/lmdb-safe.cc + lmdb-safe/lmdb-typed.cc) set(TEST_HEADER_FILES tests/parser_helper.h) set(TEST_SRC_FILES tests/cppunit.cpp tests/parser.cpp tests/parser_binary.cpp tests/parser_helper.cpp tests/data.cpp tests/utils.cpp) @@ -57,6 +61,12 @@ use_standard_filesystem(VISIBILITY PUBLIC) find_package(reflective_rapidjson${CONFIGURATION_PACKAGE_SUFFIX} REQUIRED) use_reflective_rapidjson(VISIBILITY PUBLIC) +# find lmdb +use_pkg_config_module(PKG_CONFIG_MODULES "lmdb" VISIBILITY PUBLIC) + +# configure lmdb-safe +set_source_files_properties(lmdb-safe/lmdb-safe.cc lmdb-safe/lmdb-typed.cc PROPERTIES COMPILE_FLAGS "-Wno-error") + # find 3rd party libraries zlib use_zlib() # libarchive diff --git a/libpkg/lmdb-safe b/libpkg/lmdb-safe new file mode 120000 index 0000000..3f4924c --- /dev/null +++ b/libpkg/lmdb-safe @@ -0,0 +1 @@ +../3rdparty/lmdb-safe \ No newline at end of file