link libsolvext against the system libraries
authorMichael Schroeder <mls@suse.de>
Wed, 19 Dec 2012 14:36:51 +0000 (15:36 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 19 Dec 2012 14:36:51 +0000 (15:36 +0100)
ext/CMakeLists.txt

index d956284..ad18f2d 100644 (file)
@@ -74,10 +74,22 @@ ENDIF (ENABLE_CUDFREPO)
 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")