- add ver files, fix build
[platform/upstream/libsolv.git] / ext / CMakeLists.txt
1 SET (libsolvext_SRCS
2     repo_content.c repo_deltainfoxml.c repo_helix.c repo_products.c
3     repo_releasefile_products.c repo_repomdxml.c repo_rpmmd.c
4     repo_susetags.c repo_updateinfoxml.c repo_write.c repo_zyppdb.c
5     repo_deb.c sat_xfopen.c)
6 IF (NOT DEBIAN)
7 SET (libsolvext_SRCS
8     ${libsolvext_SRCS} pool_fileconflicts.c repo_rpmdb.c)
9 ENDIF (NOT DEBIAN)
10
11 ADD_LIBRARY (libsolvext STATIC ${libsolvext_SRCS})
12 SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")
13
14 SET (libsolvext_HEADERS
15     pool_fileconflicts.h repo_content.h repo_deltainfoxml.h repo_helix.h repo_products.h
16     repo_releasefile_products.h repo_repomdxml.h repo_rpmdb.h repo_rpmmd.h
17     repo_susetags.h repo_updateinfoxml.h repo_write.h repo_zyppdb.h
18     tools_util.h repo_deb.h sat_xfopen.h)
19
20 SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
21 SET (CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/ext/libsolvext.ver")
22
23 INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/solv")
24 INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})