aboutsummaryrefslogtreecommitdiffstats
path: root/ll-database-binding/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-10-25 14:47:16 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-25 14:47:16 +0200
commit562d2639c2b675859011202a46c2ed6f61c4457c (patch)
tree1bd32ec00b91526cea073f8edd02a48387788aec /ll-database-binding/src/CMakeLists.txt
parent4a4fd954141d1fb4410bf90b00e6f6c8a6540579 (diff)
database: switch to use gdbm by default
Change-Id: I25b54a6b1f66f3acef3c1c7cb96e0daaa1019eae Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'll-database-binding/src/CMakeLists.txt')
-rw-r--r--ll-database-binding/src/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/ll-database-binding/src/CMakeLists.txt b/ll-database-binding/src/CMakeLists.txt
index 904b857..cea11a3 100644
--- a/ll-database-binding/src/CMakeLists.txt
+++ b/ll-database-binding/src/CMakeLists.txt
@@ -1,9 +1,14 @@
PROJECT_TARGET_ADD(ll-database-binding)
-find_package(BerkeleyDB REQUIRED)
+find_package(GDBM)
+if(DB_FOUND)
+ add_definitions(-DUSE_GDBM)
+else(DB_FOUND)
+ find_package(BerkeleyDB REQUIRED)
+endif(DB_FOUND)
include_directories(${DB_INCLUDE_DIR})
-add_library(ll-database-binding MODULE ll-database-binding.c utils.h)
+add_library(ll-database-binding MODULE ll-database-binding.c)
target_link_libraries(ll-database-binding ${DB_LIBRARY})
set_target_properties(ll-database-binding PROPERTIES