SET (libsolvext_HEADERS
tools_util.h solv_xfopen.h testcase.h)
-IF (ENABLE_RPMDB)
+IF (ENABLE_RPMDB OR ENABLE_RPMPKG)
SET (libsolvext_SRCS ${libsolvext_SRCS}
pool_fileconflicts.c repo_rpmdb.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
pool_fileconflicts.h repo_rpmdb.h)
-ENDIF (ENABLE_RPMDB)
+ENDIF (ENABLE_RPMDB OR ENABLE_RPMPKG)
IF (ENABLE_PUBKEY)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_susetags.h repo_zyppdb.h)
ENDIF (ENABLE_SUSEREPO)
+# old cmake does not support parenthetical expressions...
+IF (ENABLE_COMPLEX_DEPS)
+IF (ENABLE_SUSEREPO OR ENABLE_RPMMD OR ENABLE_RPMDB OR ENABLE_RPMPKG)
+ SET (libsolvext_SRCS ${libsolvext_SRCS}
+ pool_parserpmrichdep.c)
+ SET (libsolvext_HEADERS ${libsolvext_HEADERS}
+ pool_parserpmrichdep.h)
+ENDIF (ENABLE_SUSEREPO OR ENABLE_RPMMD OR ENABLE_RPMDB OR ENABLE_RPMPKG)
+ENDIF (ENABLE_COMPLEX_DEPS)
+
+IF (SUSE)
+ SET (libsolvext_SRCS ${libsolvext_SRCS}
+ repo_autopattern.c)
+ SET (libsolvext_HEADERS ${libsolvext_HEADERS}
+ repo_autopattern.h)
+ENDIF (SUSE)
+
IF (ENABLE_COMPS)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_comps.c)
repo_appdata.h)
ENDIF (ENABLE_APPDATA)
+IF (ENABLE_RPMMD OR ENABLE_SUSEREPO)
+ SET (libsolvext_SRCS ${libsolvext_SRCS}
+ repodata_diskusage.c)
+ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO)
+
+IF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
+ SET (libsolvext_SRCS ${libsolvext_SRCS}
+ solv_xmlparser.c)
+ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
+
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+IF (HAVE_LINKER_VERSION_SCRIPT)
SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINK_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/ext/libsolvext.ver")
+ENDIF (HAVE_LINKER_VERSION_SCRIPT)
IF (DISABLE_SHARED)
ADD_LIBRARY (libsolvext STATIC ${libsolvext_SRCS})
SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")
SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
+SET_TARGET_PROPERTIES(libsolvext PROPERTIES INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
-INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/solv")
+INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv")
INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
IF (ENABLE_STATIC AND NOT DISABLE_SHARED)