]> git.saurik.com Git - apt.git/blob - CMake/FindBerkeleyDB.cmake
do fail on weakhash/loop earlier in acquire
[apt.git] / CMake / FindBerkeleyDB.cmake
1 # - Try to find Berkeley DB
2 # Once done this will define
3 #
4 # BERKELEY_DB_FOUND - system has Berkeley DB
5 # BERKELEY_DB_INCLUDE_DIRS - the Berkeley DB include directory
6 # BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB
7 # BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB
8
9 # Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
10 # Copyright (c) 2016, Julian Andres Klode <jak@debian.org>
11 #
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions
14 # are met:
15 #
16 # 1. Redistributions of source code must retain the copyright
17 # notice, this list of conditions and the following disclaimer.
18 # 2. Redistributions in binary form must reproduce the copyright
19 # notice, this list of conditions and the following disclaimer in the
20 # documentation and/or other materials provided with the distribution.
21 # 3. The name of the author may not be used to endorse or promote products
22 # derived from this software without specific prior written permission.
23 #
24 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
35
36 find_path(BERKELEY_DB_INCLUDE_DIRS db.h
37 /usr/include/db5
38 /usr/local/include/db5
39 /usr/include/db4
40 /usr/local/include/db4
41 )
42
43 find_library(BERKELEY_DB_LIBRARIES NAMES db )
44
45 include(FindPackageHandleStandardArgs)
46 find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIRS BERKELEY_DB_LIBRARIES)
47 # show the BERKELEY_DB_INCLUDE_DIRS and BERKELEY_DB_LIBRARIES variables only in the advanced view
48 mark_as_advanced(BERKELEY_DB_INCLUDE_DIRS BERKELEY_DB_LIBRARIES)