File: FindBDB.cmake

package info (click to toggle)
onak 0.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,276 kB
  • sloc: ansic: 13,822; sh: 398; perl: 301; sql: 21; makefile: 19
file content (24 lines) | stat: -rw-r--r-- 626 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# No pkg-config support in Berkeley DB, so try to find it manually

set(BDB_PREFIX "" CACHE PATH "path ")

find_path(BDB_INCLUDE_DIR db.h
	PATHS ${BDB_PREFIX}/include /usr/include /usr/local/include)

find_library(BDB_LIBRARY NAMES db
	PATHS ${BDB_PREFIX}/lib /usr/lib /usr/local/lib)

if(BDB_INCLUDE_DIR AND BDB_LIBRARY)
	get_filename_component(BDB_LIBRARY_DIR ${BDB_LIBRARY} PATH)
	set(BDB_FOUND TRUE)
endif()

if(BDB_FOUND)
	if(NOT BDB_FIND_QUIETLY)
		MESSAGE(STATUS "Found Berkeley DB: ${BDB_LIBRARY}")
	endif()
elseif(BDB_FOUND)
	if(BDB_FIND_REQUIRED)
		message(FATAL_ERROR "Could not find Berkeley DB")
	endif()
endif()