Merge branch 'master' of git@git.opensuse.org:projects/zypp/sat-solver
[platform/upstream/libsolv.git] / tools / CMakeLists.txt
1 #
2 # CMakeLists.txt for sat-solver/tools
3 #
4
5 # Let's not compile the same files ten times; this library is not installed
6 ADD_LIBRARY( toolstuff STATIC repo_write.c common_write.c )
7
8 SET(rpmdb2solv_REPOS
9   rpmdb2solv.c
10   repo_rpmdb.c
11   repo_products.c
12   repo_zyppdb.c
13 )
14
15 ADD_EXECUTABLE( rpmdb2solv ${rpmdb2solv_REPOS} )
16 TARGET_LINK_LIBRARIES( rpmdb2solv satsolver toolstuff ${RPMDB_LIBRARY} ${EXPAT_LIBRARY})
17
18 SET(rpms2solv_REPOS rpms2solv.c repo_rpmdb.c )
19 ADD_EXECUTABLE( rpms2solv ${rpms2solv_REPOS} )
20 TARGET_LINK_LIBRARIES( rpms2solv satsolver toolstuff ${RPMDB_LIBRARY})
21
22 SET(rpmmd2solv_REPOS rpmmd2solv.c repo_rpmmd.c )
23 ADD_EXECUTABLE( rpmmd2solv ${rpmmd2solv_REPOS} )
24 TARGET_LINK_LIBRARIES( rpmmd2solv satsolver toolstuff ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
25
26 SET(helix2solv_REPOS helix2solv.c )
27 ADD_EXECUTABLE( helix2solv ${helix2solv_REPOS} )
28 TARGET_LINK_LIBRARIES( helix2solv satsolver toolstuff ${EXPAT_LIBRARY})
29
30 SET(susetags2solv_REPOS susetags2solv.c repo_susetags.c repo_content.c )
31 ADD_EXECUTABLE( susetags2solv ${susetags2solv_REPOS} )
32 TARGET_LINK_LIBRARIES( susetags2solv satsolver toolstuff ${ZLIB_LIBRARY})
33
34 SET(updateinfoxml2solv_REPOS updateinfoxml2solv.c repo_updateinfoxml.c)
35 ADD_EXECUTABLE( updateinfoxml2solv ${updateinfoxml2solv_REPOS} )
36 TARGET_LINK_LIBRARIES( updateinfoxml2solv satsolver toolstuff ${EXPAT_LIBRARY})
37
38 SET(deltainfoxml2solv_REPOS deltainfoxml2solv.c repo_deltainfoxml.c)
39 ADD_EXECUTABLE( deltainfoxml2solv ${deltainfoxml2solv_REPOS} )
40 TARGET_LINK_LIBRARIES( deltainfoxml2solv satsolver toolstuff ${EXPAT_LIBRARY})
41
42 SET(repomdxml2solv_REPOS repomdxml2solv.c repo_repomdxml.c)
43 ADD_EXECUTABLE( repomdxml2solv ${repomdxml2solv_REPOS} )
44 TARGET_LINK_LIBRARIES( repomdxml2solv satsolver toolstuff ${EXPAT_LIBRARY})
45
46 SET(installcheck_SOURCES installcheck.c repo_rpmmd.c repo_susetags.c)
47 ADD_EXECUTABLE(installcheck ${installcheck_SOURCES})
48 TARGET_LINK_LIBRARIES(installcheck satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
49
50 SET(patchcheck_SOURCES patchcheck.c repo_rpmmd.c repo_susetags.c repo_updateinfoxml.c)
51 ADD_EXECUTABLE(patchcheck ${patchcheck_SOURCES})
52 TARGET_LINK_LIBRARIES(patchcheck satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
53
54 ADD_EXECUTABLE( dumpsolv dumpsolv.c )
55 TARGET_LINK_LIBRARIES( dumpsolv satsolver)
56
57 ADD_EXECUTABLE( mergesolv mergesolv.c )
58 TARGET_LINK_LIBRARIES( mergesolv satsolver toolstuff)
59
60 install(TARGETS
61                 mergesolv
62                 dumpsolv
63                 susetags2solv
64                 helix2solv
65                 rpmmd2solv
66                 rpmdb2solv
67                 rpms2solv
68                 updateinfoxml2solv
69                 deltainfoxml2solv
70                 repomdxml2solv
71    DESTINATION ${BIN_INSTALL_DIR} )
72
73 install(PROGRAMS repo2solv.sh DESTINATION ${BIN_INSTALL_DIR} )