summaryrefslogtreecommitdiff
path: root/CMake/FindBerkeleyDB.cmake
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-09-01 00:53:40 +0200
committerJulian Andres Klode <jak@debian.org>2016-09-01 00:53:40 +0200
commit265c3312bd1b329dc9b54c754da46621d9019c11 (patch)
treee1c740747f84f793ee2b6ab4ffaffbc9f76cd575 /CMake/FindBerkeleyDB.cmake
parent28f0867d99398a23296ead313112402c51d4e876 (diff)
parent317bb39f3cd6626c74f25d7bdf2907f1b235f553 (diff)
Merge tag '1.3_rc3' into ubuntu/master
apt Debian release 1.3~rc3
Diffstat (limited to 'CMake/FindBerkeleyDB.cmake')
-rw-r--r--CMake/FindBerkeleyDB.cmake17
1 files changed, 14 insertions, 3 deletions
diff --git a/CMake/FindBerkeleyDB.cmake b/CMake/FindBerkeleyDB.cmake
index 44cfd3ddb..34bc3b0d1 100644
--- a/CMake/FindBerkeleyDB.cmake
+++ b/CMake/FindBerkeleyDB.cmake
@@ -33,14 +33,25 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# We need NO_DEFAULT_PATH here, otherwise CMake helpfully picks up the wrong
+# db.h on BSD systems instead of the Berkeley DB one.
find_path(BERKELEY_DB_INCLUDE_DIRS db.h
- /usr/include/db5
+ ${CMAKE_INSTALL_FULL_INCLUDEDIR}/db5
/usr/local/include/db5
- /usr/include/db4
+ /usr/include/db5
+
+ ${CMAKE_INSTALL_FULL_INCLUDEDIR}/db4
/usr/local/include/db4
+ /usr/include/db4
+
+ ${CMAKE_INSTALL_FULL_INCLUDEDIR}
+ /usr/local/include
+ /usr/include
+
+ NO_DEFAULT_PATH
)
-find_library(BERKELEY_DB_LIBRARIES NAMES db )
+find_library(BERKELEY_DB_LIBRARIES NAMES db db-5)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIRS BERKELEY_DB_LIBRARIES)