dont enable -Werror for bindings, swig sucks too much
[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 ( CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -Werror -Wall" )
10
11 SET(rpmdb2solv_REPOS
12   rpmdb2solv.c
13   repo_rpmdb.h
14   repo_rpmdb.c
15   repo_products.c
16   repo_products.h
17   repo_write.c
18   common_write.c
19 )
20
21 ADD_EXECUTABLE( rpmdb2solv ${rpmdb2solv_REPOS} )
22 TARGET_LINK_LIBRARIES( rpmdb2solv satsolver ${RPMDB_LIBRARY} ${EXPAT_LIBRARY})
23
24 SET(rpms2solv_REPOS rpms2solv.c repo_rpmdb.h repo_rpmdb.c repo_write.c common_write.c )
25 ADD_EXECUTABLE( rpms2solv ${rpms2solv_REPOS} )
26 TARGET_LINK_LIBRARIES( rpms2solv satsolver ${RPMDB_LIBRARY})
27
28 SET(rpmmd2solv_REPOS rpmmd2solv.c repo_rpmmd.h repo_rpmmd.c repo_write.c common_write.c )
29 ADD_EXECUTABLE( rpmmd2solv ${rpmmd2solv_REPOS} )
30 TARGET_LINK_LIBRARIES( rpmmd2solv satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
31
32 SET(helix2solv_REPOS helix2solv.c repo_write.c common_write.c )
33 ADD_EXECUTABLE( helix2solv ${helix2solv_REPOS} )
34 TARGET_LINK_LIBRARIES( helix2solv satsolver ${EXPAT_LIBRARY})
35
36 SET(susetags2solv_REPOS susetags2solv.c repo_susetags.h repo_susetags.c repo_content.c repo_write.c common_write.c)
37 ADD_EXECUTABLE( susetags2solv ${susetags2solv_REPOS} )
38 TARGET_LINK_LIBRARIES( susetags2solv satsolver ${ZLIB_LIBRARY})
39
40 SET(patchxml2solv_REPOS patchxml2solv.c repo_patchxml.h repo_patchxml.c repo_write.c common_write.c)
41 ADD_EXECUTABLE( patchxml2solv ${patchxml2solv_REPOS} )
42 TARGET_LINK_LIBRARIES( patchxml2solv satsolver ${EXPAT_LIBRARY})
43
44 SET(updateinfoxml2solv_REPOS updateinfoxml2solv.c repo_updateinfoxml.h repo_updateinfoxml.c repo_write.c common_write.c)
45 ADD_EXECUTABLE( updateinfoxml2solv ${updateinfoxml2solv_REPOS} )
46 TARGET_LINK_LIBRARIES( updateinfoxml2solv satsolver ${EXPAT_LIBRARY})
47
48 SET(deltainfoxml2solv_REPOS deltainfoxml2solv.c repo_deltainfoxml.h repo_deltainfoxml.c repo_write.c common_write.c)
49 ADD_EXECUTABLE( deltainfoxml2solv ${deltainfoxml2solv_REPOS} )
50 TARGET_LINK_LIBRARIES( deltainfoxml2solv satsolver ${EXPAT_LIBRARY})
51
52 SET(repomdxml2solv_REPOS repomdxml2solv.c repo_repomdxml.h repo_repomdxml.c repo_write.c common_write.c)
53 ADD_EXECUTABLE( repomdxml2solv ${repomdxml2solv_REPOS} )
54 TARGET_LINK_LIBRARIES( repomdxml2solv satsolver ${EXPAT_LIBRARY})
55
56
57 SET(dumpsolv_REPOS dumpsolv.c)
58 ADD_EXECUTABLE( dumpsolv ${dumpsolv_REPOS} )
59 TARGET_LINK_LIBRARIES( dumpsolv satsolver)
60
61 SET(mergesolv_REPOS mergesolv.c repo_write.c common_write.c)
62 ADD_EXECUTABLE( mergesolv ${mergesolv_REPOS} )
63 TARGET_LINK_LIBRARIES( mergesolv satsolver)
64
65 install(TARGETS
66                 mergesolv 
67                 dumpsolv 
68                 patchxml2solv 
69                 susetags2solv
70                 helix2solv 
71                 rpmmd2solv 
72                 rpmdb2solv
73                 rpms2solv
74                 updateinfoxml2solv
75                 deltainfoxml2solv
76                 repomdxml2solv
77    DESTINATION ${BIN_INSTALL_DIR} )
78
79 install(PROGRAMS repo2solv.sh DESTINATION ${BIN_INSTALL_DIR} )