blob: f01c02384ba2cb3ba57f0792cd51a4e612fae3b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
SET (libsolvext_SRCS
solv_xfopen.c testcase.c repo_testcase.c)
SET (libsolvext_HEADERS
tools_util.h solv_xfopen.h testcase.h)
IF (ENABLE_RPMDB OR ENABLE_RPMPKG)
SET (libsolvext_SRCS ${libsolvext_SRCS}
pool_fileconflicts.c repo_rpmdb.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
pool_fileconflicts.h repo_rpmdb.h)
ENDIF (ENABLE_RPMDB OR ENABLE_RPMPKG)
IF (ENABLE_PUBKEY)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_pubkey.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_pubkey.h)
ENDIF (ENABLE_PUBKEY)
IF (ENABLE_PGPVRFY)
SET (libsolvext_SRCS ${libsolvext_SRCS}
solv_pgpvrfy.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
solv_pgpvrfy.h)
ENDIF (ENABLE_PGPVRFY)
IF (ENABLE_RPMMD)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_repomdxml.c repo_rpmmd.c
repo_deltainfoxml.c repo_updateinfoxml.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_repomdxml.h repo_rpmmd.h
repo_deltainfoxml.h repo_updateinfoxml.h)
ENDIF (ENABLE_RPMMD)
IF (ENABLE_SUSEREPO)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_content.c repo_products.c repo_releasefile_products.c
repo_susetags.c repo_zyppdb.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_content.h repo_products.h repo_releasefile_products.h
repo_susetags.h repo_zyppdb.h)
ENDIF (ENABLE_SUSEREPO)
# old cmake does not support parenthetical expressions...
IF (ENABLE_COMPLEX_DEPS)
IF (ENABLE_SUSEREPO OR ENABLE_RPMMD OR ENABLE_RPMDB OR ENABLE_RPMPKG)
SET (libsolvext_SRCS ${libsolvext_SRCS}
pool_parserpmrichdep.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
pool_parserpmrichdep.h)
ENDIF (ENABLE_SUSEREPO OR ENABLE_RPMMD OR ENABLE_RPMDB OR ENABLE_RPMPKG)
ENDIF (ENABLE_COMPLEX_DEPS)
IF (SUSE)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_autopattern.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_autopattern.h)
ENDIF (SUSE)
IF (ENABLE_COMPS)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_comps.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_comps.h)
ENDIF (ENABLE_COMPS)
IF (ENABLE_DEBIAN)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_deb.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_deb.h)
ENDIF (ENABLE_DEBIAN)
IF (ENABLE_HELIXREPO)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_helix.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_helix.h)
ENDIF (ENABLE_HELIXREPO)
IF (ENABLE_MDKREPO)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_mdk.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_mdk.h)
ENDIF (ENABLE_MDKREPO)
IF (ENABLE_ARCHREPO)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_arch.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_arch.h)
ENDIF (ENABLE_ARCHREPO)
IF (ENABLE_CUDFREPO)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_cudf.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_cudf.h)
ENDIF (ENABLE_CUDFREPO)
IF (ENABLE_HAIKU)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_haiku.cpp)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_haiku.h)
ENDIF (ENABLE_HAIKU)
IF (ENABLE_APPDATA)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_appdata.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_appdata.h)
ENDIF (ENABLE_APPDATA)
IF (ENABLE_CONDA)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repo_conda.c)
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
repo_conda.h)
ENDIF (ENABLE_CONDA)
IF (ENABLE_RPMMD OR ENABLE_SUSEREPO)
SET (libsolvext_SRCS ${libsolvext_SRCS}
repodata_diskusage.c)
ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO)
IF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
SET (libsolvext_SRCS ${libsolvext_SRCS}
solv_xmlparser.c)
ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
IF (ENABLE_CONDA)
SET (libsolvext_SRCS ${libsolvext_SRCS}
solv_jsonparser.c)
ENDIF (ENABLE_CONDA)
IF (ENABLE_ZCHUNK_COMPRESSION)
SET (libsolvext_SRCS ${libsolvext_SRCS}
solv_zchunk.c)
ENDIF (ENABLE_ZCHUNK_COMPRESSION)
IF (NOT MSVC)
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
ENDIF (NOT MSVC)
IF (HAVE_LINKER_VERSION_SCRIPT)
SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINK_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/ext/libsolvext.ver")
ENDIF (HAVE_LINKER_VERSION_SCRIPT)
IF (DISABLE_SHARED)
ADD_LIBRARY (libsolvext STATIC ${libsolvext_SRCS})
ELSE (DISABLE_SHARED)
ADD_LIBRARY (libsolvext SHARED ${libsolvext_SRCS})
TARGET_LINK_LIBRARIES(libsolvext libsolv ${SYSTEM_LIBRARIES})
ENDIF (DISABLE_SHARED)
IF (WIN32)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/win32/)
ENDIF ()
SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")
SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")
INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
ADD_LIBRARY (libsolvext_static STATIC ${libsolvext_SRCS})
SET_TARGET_PROPERTIES(libsolvext_static PROPERTIES OUTPUT_NAME "solvext")
SET_TARGET_PROPERTIES(libsolvext_static PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
INSTALL (TARGETS libsolvext_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF (ENABLE_STATIC AND NOT DISABLE_SHARED)
|