diff options
author | BYVoid <byvoid.kcp@gmail.com> | 2011-08-11 18:19:08 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-08-12 10:39:03 +0800 |
commit | c47a095c10f6104fefb7d0406b7f4076ed47f16c (patch) | |
tree | a4c3261f5e406b5b6c60f4636f327db9d668bedc /cmake/FindBerkeleyDB.cmake | |
parent | bd70f3fe77a2eda3b902c1514b07fbc821c9c1b4 (diff) | |
download | libpinyin-c47a095c10f6104fefb7d0406b7f4076ed47f16c.tar.gz libpinyin-c47a095c10f6104fefb7d0406b7f4076ed47f16c.tar.xz libpinyin-c47a095c10f6104fefb7d0406b7f4076ed47f16c.zip |
Add cmake scripts.
Diffstat (limited to 'cmake/FindBerkeleyDB.cmake')
-rw-r--r-- | cmake/FindBerkeleyDB.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/FindBerkeleyDB.cmake b/cmake/FindBerkeleyDB.cmake new file mode 100644 index 0000000..749f166 --- /dev/null +++ b/cmake/FindBerkeleyDB.cmake @@ -0,0 +1,25 @@ +# - Try to find Berkeley DB +# Once done this will define +# +# BERKELEY_DB_FOUND - system has Berkeley DB +# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory +# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB +# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB + +# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +FIND_PATH(BERKELEY_DB_INCLUDE_DIR db.h + /usr/include/db4 + /usr/local/include/db4 +) + +FIND_LIBRARY(BERKELEY_DB_LIBRARIES NAMES db ) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES) +# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view +MARK_AS_ADVANCED(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES ) + |