aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/FindBerkeleyDB.cmake
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/cmake/FindBerkeleyDB.cmake
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/cmake/FindBerkeleyDB.cmake50
1 files changed, 50 insertions, 0 deletions
diff --git a/linden/indra/cmake/FindBerkeleyDB.cmake b/linden/indra/cmake/FindBerkeleyDB.cmake
new file mode 100644
index 0000000..2d633c7
--- /dev/null
+++ b/linden/indra/cmake/FindBerkeleyDB.cmake
@@ -0,0 +1,50 @@
1# -*- cmake -*-
2
3# - Find BerkeleyDB
4# Find the BerkeleyDB includes and library
5# This module defines
6# DB_INCLUDE_DIR, where to find db.h, etc.
7# DB_LIBRARIES, the libraries needed to use BerkeleyDB.
8# DB_FOUND, If false, do not try to use BerkeleyDB.
9# also defined, but not for general use are
10# DB_LIBRARY, where to find the BerkeleyDB library.
11
12FIND_PATH(DB_INCLUDE_DIR db.h
13/usr/local/include/db4
14/usr/local/include
15/usr/include/db4
16/usr/include
17)
18
19SET(DB_NAMES ${DB_NAMES} db)
20FIND_LIBRARY(DB_LIBRARY
21 NAMES ${DB_NAMES}
22 PATHS /usr/lib /usr/local/lib
23 )
24
25IF (DB_LIBRARY AND DB_INCLUDE_DIR)
26 SET(DB_LIBRARIES ${DB_LIBRARY})
27 SET(DB_FOUND "YES")
28ELSE (DB_LIBRARY AND DB_INCLUDE_DIR)
29 SET(DB_FOUND "NO")
30ENDIF (DB_LIBRARY AND DB_INCLUDE_DIR)
31
32
33IF (DB_FOUND)
34 IF (NOT DB_FIND_QUIETLY)
35 MESSAGE(STATUS "Found BerkeleyDB: ${DB_LIBRARIES}")
36 ENDIF (NOT DB_FIND_QUIETLY)
37ELSE (DB_FOUND)
38 IF (DB_FIND_REQUIRED)
39 MESSAGE(FATAL_ERROR "Could not find BerkeleyDB library")
40 ENDIF (DB_FIND_REQUIRED)
41ENDIF (DB_FOUND)
42
43# Deprecated declarations.
44SET (NATIVE_DB_INCLUDE_PATH ${DB_INCLUDE_DIR} )
45GET_FILENAME_COMPONENT (NATIVE_DB_LIB_PATH ${DB_LIBRARY} PATH)
46
47MARK_AS_ADVANCED(
48 DB_LIBRARY
49 DB_INCLUDE_DIR
50 )