- prepare for tools testing
[platform/upstream/libsolv.git] / tools / CMakeLists.txt
1 #
2 # CMakeLists.txt for sat-solver/tools
3 #
4
5 ENABLE_TESTING()
6
7 ADD_SUBDIRECTORY(tests)
8
9 SET(rpmdb2solv_REPOS
10   rpmdb2solv.c
11   repo_rpmdb.h
12   repo_rpmdb.c
13   repo_write.c
14   common_write.c
15 )
16
17 ADD_EXECUTABLE( rpmdb2solv ${rpmdb2solv_REPOS} )
18 TARGET_LINK_LIBRARIES( rpmdb2solv satsolver ${RPMDB_LIBRARY})
19
20 SET(rpms2solv_REPOS rpms2solv.c repo_rpmdb.h repo_rpmdb.c repo_write.c common_write.c )
21 ADD_EXECUTABLE( rpms2solv ${rpms2solv_REPOS} )
22 TARGET_LINK_LIBRARIES( rpms2solv satsolver ${RPMDB_LIBRARY})
23
24 SET(rpmmd2solv_REPOS rpmmd2solv.c repo_rpmmd.h repo_rpmmd.c repo_write.c common_write.c )
25 ADD_EXECUTABLE( rpmmd2solv ${rpmmd2solv_REPOS} )
26 TARGET_LINK_LIBRARIES( rpmmd2solv satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
27
28 SET(helix2solv_REPOS helix2solv.c repo_write.c common_write.c )
29 ADD_EXECUTABLE( helix2solv ${helix2solv_REPOS} )
30 TARGET_LINK_LIBRARIES( helix2solv satsolver ${EXPAT_LIBRARY})
31
32 SET(susetags2solv_REPOS susetags2solv.c repo_susetags.h repo_susetags.c repo_content.c repo_write.c common_write.c)
33 ADD_EXECUTABLE( susetags2solv ${susetags2solv_REPOS} )
34 TARGET_LINK_LIBRARIES( susetags2solv satsolver ${ZLIB_LIBRARY})
35
36 SET(patchxml2solv_REPOS patchxml2solv.c repo_patchxml.h repo_patchxml.c repo_write.c common_write.c)
37 ADD_EXECUTABLE( patchxml2solv ${patchxml2solv_REPOS} )
38 TARGET_LINK_LIBRARIES( patchxml2solv satsolver ${EXPAT_LIBRARY})
39
40 SET(updateinfoxml2solv_REPOS updateinfoxml2solv.c repo_updateinfoxml.h repo_updateinfoxml.c repo_write.c common_write.c)
41 ADD_EXECUTABLE( updateinfoxml2solv ${updateinfoxml2solv_REPOS} )
42 TARGET_LINK_LIBRARIES( updateinfoxml2solv satsolver ${EXPAT_LIBRARY})
43
44 SET(deltainfoxml2solv_REPOS deltainfoxml2solv.c repo_deltainfoxml.h repo_deltainfoxml.c repo_write.c common_write.c)
45 ADD_EXECUTABLE( deltainfoxml2solv ${deltainfoxml2solv_REPOS} )
46 TARGET_LINK_LIBRARIES( deltainfoxml2solv satsolver ${EXPAT_LIBRARY})
47
48 SET(dumpsolv_REPOS dumpsolv.c)
49 ADD_EXECUTABLE( dumpsolv ${dumpsolv_REPOS} )
50 TARGET_LINK_LIBRARIES( dumpsolv satsolver)
51
52 SET(mergesolv_REPOS mergesolv.c repo_write.c common_write.c)
53 ADD_EXECUTABLE( mergesolv ${mergesolv_REPOS} )
54 TARGET_LINK_LIBRARIES( mergesolv satsolver)
55
56 install(TARGETS
57                 mergesolv 
58                 dumpsolv 
59                 patchxml2solv 
60                 susetags2solv
61                 helix2solv 
62                 rpmmd2solv 
63                 rpmdb2solv
64                 rpms2solv
65                 updateinfoxml2solv
66                 deltainfoxml2solv
67    DESTINATION ${BIN_INSTALL_DIR} )
68
69 install(PROGRAMS repo2solv.sh DESTINATION ${BIN_INSTALL_DIR} )