Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- support cmake -DRPM5=1

  • Loading branch information...
commit e495edc2eb71a89f6b6fa60b712ca987457be29e 1 parent eabe023
@mlschroe mlschroe authored
Showing with 24 additions and 4 deletions.
  1. +24 −4 CMakeLists.txt
View
28 CMakeLists.txt
@@ -50,22 +50,42 @@ MESSAGE(STATUS "Enabling multi dist support")
ADD_DEFINITIONS( -DMULTI_SEMANTICS)
ENDIF ( MULTI_SEMANTICS )
-IF ( NOT DEBIAN )
+IF ( RPM5 )
+MESSAGE(STATUS "Enabling RPM 5 support")
+ADD_DEFINITIONS( -DRPM5)
+FIND_PACKAGE(PkgConfig REQUIRED)
+PKG_CHECK_MODULES(RPM REQUIRED rpm)
+INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} )
+ENDIF (RPM5 )
+
+
+IF ( RPM5 OR NOT DEBIAN )
FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
+
IF ( NOT RPMDB_LIBRARY )
FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm)
ENDIF( NOT RPMDB_LIBRARY )
+
FIND_LIBRARY(RPMIO_LIBRARY NAMES rpmio)
IF ( RPMIO_LIBRARY )
SET( RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY} )
ENDIF ( RPMIO_LIBRARY )
-IF ( FEDORA )
+
+IF ( RPM5 )
+FIND_LIBRARY(RPMMISC_LIBRARY NAMES rpmmisc)
+IF ( RPMMISC_LIBRARY )
+SET ( RPMDB_LIBRARY ${RPMMISC_LIBRARY} ${RPMDB_LIBRARY} )
+ENDIF ( RPMMISC_LIBRARY )
+ENDIF ( RPM5 )
+
+IF ( RPM5 OR FEDORA )
FIND_LIBRARY(DB_LIBRARY NAMES db)
IF ( DB_LIBRARY )
SET( RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY} )
ENDIF ( DB_LIBRARY )
-ENDIF ( FEDORA )
-ENDIF ( NOT DEBIAN )
+ENDIF ( RPM5 OR FEDORA )
+
+ENDIF ( RPM5 OR NOT DEBIAN )
INCLUDE ( CheckFunctionExists )
INCLUDE ( TestBigEndian )
Please sign in to comment.
Something went wrong with that request. Please try again.