Already use LOCALPOOL when converting filelist/language extensions
[platform/upstream/libsolv.git] / tools / CMakeLists.txt
1 #
2 # CMakeLists.txt for tools
3 #
4
5 ADD_LIBRARY (toolstuff STATIC common_write.c)
6
7 # as we link with --as-needed we do not get bogus dependencies
8 SET (SYSTEM_LIBRARIES ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
9 IF (ENABLE_LZMA_COMPRESSION)
10 SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${LZMA_LIBRARY})
11 ENDIF (ENABLE_LZMA_COMPRESSION)
12 IF (ENABLE_BZIP2_COMPRESSION)
13 SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${BZIP2_LIBRARIES})
14 ENDIF (ENABLE_BZIP2_COMPRESSION)
15 IF (ENABLE_RPMDB)
16 SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES})
17 ENDIF (ENABLE_RPMDB)
18
19 SET (tools_list mergesolv dumpsolv installcheck testsolv)
20
21 IF (ENABLE_RPMDB)
22 ADD_EXECUTABLE (rpmdb2solv rpmdb2solv.c)
23 TARGET_LINK_LIBRARIES (rpmdb2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
24
25 ADD_EXECUTABLE (rpms2solv rpms2solv.c)
26 TARGET_LINK_LIBRARIES (rpms2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
27
28 ADD_EXECUTABLE (findfileconflicts findfileconflicts.c)
29 TARGET_LINK_LIBRARIES (findfileconflicts libsolvext libsolv ${SYSTEM_LIBRARIES})
30
31 SET (tools_list ${tools_list} rpmdb2solv rpms2solv)
32 ENDIF (ENABLE_RPMDB)
33
34 IF (ENABLE_RPMMD)
35 ADD_EXECUTABLE (repomdxml2solv repomdxml2solv.c)
36 TARGET_LINK_LIBRARIES (repomdxml2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
37
38 ADD_EXECUTABLE (rpmmd2solv rpmmd2solv.c)
39 TARGET_LINK_LIBRARIES (rpmmd2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
40
41 ADD_EXECUTABLE (updateinfoxml2solv updateinfoxml2solv.c)
42 TARGET_LINK_LIBRARIES (updateinfoxml2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
43
44 ADD_EXECUTABLE (deltainfoxml2solv deltainfoxml2solv.c)
45 TARGET_LINK_LIBRARIES (deltainfoxml2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
46
47 SET (tools_list ${tools_list} repomdxml2solv rpmmd2solv updateinfoxml2solv deltainfoxml2solv)
48 ENDIF (ENABLE_RPMMD)
49
50 IF (ENABLE_HELIXREPO)
51 ADD_EXECUTABLE (helix2solv helix2solv.c)
52 TARGET_LINK_LIBRARIES (helix2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
53
54 SET (tools_list ${tools_list} helix2solv)
55 ENDIF (ENABLE_HELIXREPO)
56
57 IF (ENABLE_SUSEREPO)
58 ADD_EXECUTABLE (susetags2solv susetags2solv.c)
59 TARGET_LINK_LIBRARIES (susetags2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
60
61 SET (tools_list ${tools_list} susetags2solv)
62 ENDIF (ENABLE_SUSEREPO)
63
64 IF (ENABLE_COMPS)
65 ADD_EXECUTABLE (comps2solv comps2solv.c)
66 TARGET_LINK_LIBRARIES (comps2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
67
68 SET (tools_list ${tools_list} comps2solv)
69 ENDIF (ENABLE_COMPS)
70
71 IF (ENABLE_DEBIAN)
72 ADD_EXECUTABLE (deb2solv deb2solv.c)
73 TARGET_LINK_LIBRARIES (deb2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
74
75 SET (tools_list ${tools_list} deb2solv)
76 ENDIF (ENABLE_DEBIAN)
77
78 IF (ENABLE_MDKREPO)
79 ADD_EXECUTABLE (mdk2solv mdk2solv.c)
80 TARGET_LINK_LIBRARIES (mdk2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
81
82 SET (tools_list ${tools_list} mdk2solv)
83 ENDIF (ENABLE_MDKREPO)
84
85 IF (ENABLE_ARCHREPO)
86 ADD_EXECUTABLE (archpkgs2solv archpkgs2solv.c)
87 TARGET_LINK_LIBRARIES (archpkgs2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
88
89 ADD_EXECUTABLE (archrepo2solv archrepo2solv.c)
90 TARGET_LINK_LIBRARIES (archrepo2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
91
92 SET (tools_list ${tools_list} archpkgs2solv archrepo2solv)
93 ENDIF (ENABLE_ARCHREPO)
94
95 IF (ENABLE_CUDFREPO)
96 ADD_EXECUTABLE (cudftest cudftest.c)
97 TARGET_LINK_LIBRARIES (cudftest libsolvext libsolv ${SYSTEM_LIBRARIES})
98 ENDIF (ENABLE_CUDFREPO)
99
100 ADD_EXECUTABLE (installcheck installcheck.c)
101 TARGET_LINK_LIBRARIES (installcheck libsolvext libsolv ${SYSTEM_LIBRARIES})
102
103 ADD_EXECUTABLE (patchcheck patchcheck.c)
104 TARGET_LINK_LIBRARIES (patchcheck libsolvext libsolv ${SYSTEM_LIBRARIES})
105
106 ADD_EXECUTABLE (dumpsolv dumpsolv.c )
107 TARGET_LINK_LIBRARIES (dumpsolv libsolv)
108
109 ADD_EXECUTABLE (mergesolv mergesolv.c )
110 TARGET_LINK_LIBRARIES (mergesolv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
111
112 ADD_EXECUTABLE (testsolv testsolv.c)
113 TARGET_LINK_LIBRARIES (testsolv libsolvext libsolv ${SYSTEM_LIBRARIES})
114
115 INSTALL (TARGETS ${tools_list} DESTINATION ${BIN_INSTALL_DIR})
116
117 INSTALL (PROGRAMS repo2solv.sh DESTINATION ${BIN_INSTALL_DIR})