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 ADD_EXECUTABLE( dumpsolv dumpsolv.c )
51 TARGET_LINK_LIBRARIES( dumpsolv satsolver)
52
53 ADD_EXECUTABLE( mergesolv mergesolv.c )
54 TARGET_LINK_LIBRARIES( mergesolv satsolver toolstuff)
55
56 install(TARGETS
57                 mergesolv
58                 dumpsolv
59                 susetags2solv
60                 helix2solv
61                 rpmmd2solv
62                 rpmdb2solv
63                 rpms2solv
64                 updateinfoxml2solv
65                 deltainfoxml2solv
66                 repomdxml2solv
67    DESTINATION ${BIN_INSTALL_DIR} )
68
69 install(PROGRAMS repo2solv.sh DESTINATION ${BIN_INSTALL_DIR} )