summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2016-05-13 20:55:25 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2016-11-29 23:42:33 (GMT)
commitffb5030e91029746220fd62702f496ad7d6d034f (patch)
tree2b463ec74a127b821a24cd70aa921f3cae92e9c5 /config
parent4e930f83973101a23e6e21d7d2549b939f3b9d1a (diff)
downloadhdf5-ffb5030e91029746220fd62702f496ad7d6d034f.zip
hdf5-ffb5030e91029746220fd62702f496ad7d6d034f.tar.gz
hdf5-ffb5030e91029746220fd62702f496ad7d6d034f.tar.bz2
Add Berkeley DB metadata index plugin
Diffstat (limited to 'config')
-rw-r--r--config/cmake/FindDB.cmake22
-rw-r--r--config/cmake/H5pubconf.h.in3
2 files changed, 25 insertions, 0 deletions
diff --git a/config/cmake/FindDB.cmake b/config/cmake/FindDB.cmake
new file mode 100644
index 0000000..7dbc64e
--- /dev/null
+++ b/config/cmake/FindDB.cmake
@@ -0,0 +1,22 @@
+# - Try to find Berkeley DB
+# Once done this will define
+# DB_FOUND - System has Berkeley DB
+# DB_INCLUDE_DIRS - The DB include directories
+# DB_LIBRARIES - The libraries needed to use DB
+
+find_path(DB_INCLUDE_DIR db.h
+ HINTS /usr/local/include /usr/include)
+
+find_library(DB_LIBRARY NAMES db
+ PATHS /usr/local/lib /usr/lib)
+
+set(DB_INCLUDE_DIRS ${DB_INCLUDE_DIR})
+set(DB_LIBRARIES ${DB_LIBRARY})
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set DB_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(DB DEFAULT_MSG
+ DB_INCLUDE_DIR DB_LIBRARY)
+
+mark_as_advanced(DB_INCLUDE_DIR DB_LIBRARY)
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 2635ca9..b09aeb6 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -233,6 +233,9 @@
/* Define if we have support for FastBit */
#cmakedefine H5_HAVE_FASTBIT @H5_HAVE_FASTBIT@
+/* Define if we have support for Berkeley DB */
+#cmakedefine H5_HAVE_DB @H5_HAVE_DB@
+
/* Define to 1 if you have the <pthread.h> header file. */
#cmakedefine H5_HAVE_PTHREAD_H @H5_HAVE_PTHREAD_H@