diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b7e5d7a..c1ada00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ OPTION (ENABLE_RPMPKG "Build with rpm package support?" OFF) OPTION (ENABLE_PUBKEY "Build with pubkey support?" OFF) OPTION (ENABLE_RPMDB_BYRPMHEADER "Build with rpmdb Header support?" OFF) OPTION (ENABLE_RPMDB_LIBRPM "Use librpm to access the rpm database?" OFF) +OPTION (ENABLE_RPMDB_BDB "Use BerkeleyDB to access the rpm database?" OFF) OPTION (ENABLE_RPMPKG_LIBRPM "Use librpm to access rpm header information?" OFF) OPTION (ENABLE_RPMMD "Build with rpmmd repository support?" OFF) OPTION (ENABLE_SUSEREPO "Build with suse repository support?" OFF) @@ -223,19 +224,26 @@ IF (ENABLE_RPMDB OR ENABLE_RPMPKG_LIBRPM) ENDIF (RPMMISC_LIBRARY) ENDIF (RPM5) - # check if rpm contains a bundled berkeley db - CHECK_INCLUDE_FILE(rpm/db.h HAVE_RPM_DB_H) - IF (NOT ENABLE_RPMDB_LIBRPM) - IF (NOT HAVE_RPM_DB_H) - FIND_LIBRARY (DB_LIBRARY NAMES db) - IF (DB_LIBRARY) - SET (RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY}) - ENDIF (DB_LIBRARY) - IF (DB_INCLUDE_DIR) - INCLUDE_DIRECTORIES (${DB_INCLUDE_DIR}) - ENDIF (DB_INCLUDE_DIR) - ENDIF (NOT HAVE_RPM_DB_H) - ENDIF (NOT ENABLE_RPMDB_LIBRPM) + IF (ENABLE_RPMDB) + IF (NOT ENABLE_RPMDB_BDB) + SET (ENABLE_RPMDB_LIBRPM ON) + ENDIF (NOT ENABLE_RPMDB_BDB) + + # check if rpm contains a bundled berkeley db + CHECK_INCLUDE_FILE(rpm/db.h HAVE_RPM_DB_H) + IF (NOT ENABLE_RPMDB_LIBRPM) + IF (NOT HAVE_RPM_DB_H) + FIND_LIBRARY (DB_LIBRARY NAMES db) + IF (DB_LIBRARY) + SET (RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY}) + ENDIF (DB_LIBRARY) + IF (DB_INCLUDE_DIR) + INCLUDE_DIRECTORIES (${DB_INCLUDE_DIR}) + ENDIF (DB_INCLUDE_DIR) + ENDIF (NOT HAVE_RPM_DB_H) + ENDIF (NOT ENABLE_RPMDB_LIBRPM) + ENDIF (ENABLE_RPMDB) + INCLUDE (CheckLibraryExists) CHECK_LIBRARY_EXISTS(rpmio pgpDigGetParams "" HAVE_PGPDIGGETPARAMS) CHECK_LIBRARY_EXISTS(rpm rpmdbNextIteratorHeaderBlob "" HAVE_RPMDBNEXTITERATORHEADERBLOB) |