diff options
author | Allen Winter <allen.winter@kdab.com> | 2014-12-06 13:13:51 -0500 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2014-12-06 13:13:51 -0500 |
commit | 28ecefc57cfe4057a43df6467ff882b224f68e60 (patch) | |
tree | fd0dcb3b463cf49eb8bf127974d09012c8bfaf8e /cmake/modules | |
parent | ce972aaef41c0eb69420d152126f94c619d31903 (diff) | |
download | libical-git-28ecefc57cfe4057a43df6467ff882b224f68e60.tar.gz |
rename FindDB to FindBDB and change the cmake variables accordingly
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindBDB.cmake | 49 | ||||
-rw-r--r-- | cmake/modules/FindDB.cmake | 49 |
2 files changed, 49 insertions, 49 deletions
diff --git a/cmake/modules/FindBDB.cmake b/cmake/modules/FindBDB.cmake new file mode 100644 index 00000000..341e1fda --- /dev/null +++ b/cmake/modules/FindBDB.cmake @@ -0,0 +1,49 @@ +# Finds the Berkeley DB Library +# +# BDB_FOUND - True if Berkeley DB found. +# BDB_INCLUDE_DIR - Directory to include to get Berkeley DB headers +# BDB_LIBRARY - Library to link against for the Berkeley DB +# + +if(BDB_INCLUDE_DIR AND BDB_LIBRARY) + # Already in cache, be silent + set(BDB_FIND_QUIETLY TRUE) +endif() + +# Look for the header file. +find_path( + BDB_INCLUDE_DIR + NAMES db.h + HINTS /usr/local/opt/db/include + DOC "Include directory for the Berkeley DB library" +) +mark_as_advanced(BDB_INCLUDE_DIR) + +# Look for the library. +find_library( + BDB_LIBRARY + NAMES db + HINTS /usr/local/opt/db4/lib + DOC "Libraries to link against for the Berkeley DB" +) +mark_as_advanced(BDB_LIBRARY) + +# Copy the results to the output variables. +if(BDB_INCLUDE_DIR AND BDB_LIBRARY) + set(BDB_FOUND 1) +else() + set(BDB_FOUND 0) +endif() + +if(BDB_FOUND) + if(NOT BDB_FIND_QUIETLY) + message(STATUS "Found Berkeley DB header files in ${BDB_INCLUDE_DIR}") + message(STATUS "Found Berkeley libraries: ${BDB_LIBRARY}") + endif() +else() + if(BDB_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Berkeley DB") + else() + message(STATUS "Optional package Berkeley DB was not found") + endif() +endif() diff --git a/cmake/modules/FindDB.cmake b/cmake/modules/FindDB.cmake deleted file mode 100644 index 5449136d..00000000 --- a/cmake/modules/FindDB.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# Finds the Berkeley DB Library -# -# DB_FOUND - True if Berkeley DB found. -# DB_INCLUDE_DIR - Directory to include to get Berkeley DB headers -# DB_LIBRARY - Library to link against for the Berkeley DB -# - -if(DB_INCLUDE_DIR AND DB_LIBRARY) - # Already in cache, be silent - set(DB_FIND_QUIETLY TRUE) -endif() - -# Look for the header file. -find_path( - DB_INCLUDE_DIR - NAMES db.h - HINTS /usr/local/opt/db/include - DOC "Include directory for the Berkeley DB library" -) -mark_as_advanced(DB_INCLUDE_DIR) - -# Look for the library. -find_library( - DB_LIBRARY - NAMES db - HINTS /usr/local/opt/db4/lib - DOC "Libraries to link against for the Berkeley DB" -) -mark_as_advanced(DB_LIBRARY) - -# Copy the results to the output variables. -if(DB_INCLUDE_DIR AND DB_LIBRARY) - set(DB_FOUND 1) -else() - set(DB_FOUND 0) -endif() - -if(DB_FOUND) - if(NOT DB_FIND_QUIETLY) - message(STATUS "Found Berkeley DB header files in ${DB_INCLUDE_DIR}") - message(STATUS "Found Berkeley libraries: ${DB_LIBRARY}") - endif() -else() - if(DB_FIND_REQUIRED) - message(FATAL_ERROR "Could not find Berkeley DB") - else() - message(STATUS "Optional package Berkeley DB was not found") - endif() -endif() |