SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
SET (CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/ext/libsolvext.ver")
+SET (SYSTEM_LIBRARIES ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
+IF (ENABLE_LZMA_COMPRESSION)
+SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${LZMA_LIBRARY})
+ENDIF (ENABLE_LZMA_COMPRESSION)
+IF (ENABLE_BZIP2_COMPRESSION)
+SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${BZIP2_LIBRARIES})
+ENDIF (ENABLE_BZIP2_COMPRESSION)
+IF (ENABLE_RPMDB)
+SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES})
+ENDIF (ENABLE_RPMDB)
+
IF (DISABLE_SHARED)
ADD_LIBRARY (libsolvext STATIC ${libsolvext_SRCS})
ELSE (DISABLE_SHARED)
ADD_LIBRARY (libsolvext SHARED ${libsolvext_SRCS})
+TARGET_LINK_LIBRARIES(libsolvext ${SYSTEM_LIBRARIES})
ENDIF (DISABLE_SHARED)
SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")