summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2009-06-22 12:49:11 +0200
committerMichael Schroeder <mls@suse.de>2009-06-22 12:49:11 +0200
commit7a60246713fd21a3d15aff18452b31e4762f9902 (patch)
tree373f64eb4fb1065c79ae2f9f37c342f6f7a5a2ed
parentecb4d9039a348c69c423bf90863a776dc8f72205 (diff)
downloadlibsolv-7a60246713fd21a3d15aff18452b31e4762f9902.tar.gz
libsolv-7a60246713fd21a3d15aff18452b31e4762f9902.tar.bz2
libsolv-7a60246713fd21a3d15aff18452b31e4762f9902.zip
- create libsatsolverext static library
-rw-r--r--CMakeLists.txt3
-rw-r--r--ext/CMakeLists.txt17
-rw-r--r--ext/pool_fileconflicts.c (renamed from tools/pool_fileconflicts.c)0
-rw-r--r--ext/pool_fileconflicts.h (renamed from tools/pool_fileconflicts.h)0
-rw-r--r--ext/repo_content.c (renamed from tools/repo_content.c)0
-rw-r--r--ext/repo_content.h (renamed from tools/repo_content.h)0
-rw-r--r--ext/repo_deltainfoxml.c (renamed from tools/repo_deltainfoxml.c)0
-rw-r--r--ext/repo_deltainfoxml.h (renamed from tools/repo_deltainfoxml.h)0
-rw-r--r--ext/repo_products.c (renamed from tools/repo_products.c)0
-rw-r--r--ext/repo_products.h (renamed from tools/repo_products.h)0
-rw-r--r--ext/repo_releasefile_products.c (renamed from tools/repo_releasefile_products.c)0
-rw-r--r--ext/repo_releasefile_products.h (renamed from tools/repo_releasefile_products.h)0
-rw-r--r--ext/repo_repomdxml.c (renamed from tools/repo_repomdxml.c)0
-rw-r--r--ext/repo_repomdxml.h (renamed from tools/repo_repomdxml.h)0
-rw-r--r--ext/repo_rpmdb.c (renamed from tools/repo_rpmdb.c)0
-rw-r--r--ext/repo_rpmdb.h (renamed from tools/repo_rpmdb.h)0
-rw-r--r--ext/repo_rpmmd.c (renamed from tools/repo_rpmmd.c)0
-rw-r--r--ext/repo_rpmmd.h (renamed from tools/repo_rpmmd.h)0
-rw-r--r--ext/repo_susetags.c (renamed from tools/repo_susetags.c)0
-rw-r--r--ext/repo_susetags.h (renamed from tools/repo_susetags.h)0
-rw-r--r--ext/repo_updateinfoxml.c (renamed from tools/repo_updateinfoxml.c)0
-rw-r--r--ext/repo_updateinfoxml.h (renamed from tools/repo_updateinfoxml.h)0
-rw-r--r--ext/repo_write.c (renamed from tools/repo_write.c)0
-rw-r--r--ext/repo_write.h (renamed from tools/repo_write.h)0
-rw-r--r--ext/repo_zyppdb.c (renamed from tools/repo_zyppdb.c)0
-rw-r--r--ext/repo_zyppdb.h (renamed from tools/repo_zyppdb.h)0
-rw-r--r--ext/tools_util.h (renamed from tools/tools_util.h)0
-rw-r--r--package/libsatsolver.spec.in1
-rw-r--r--tools/CMakeLists.txt101
29 files changed, 62 insertions, 60 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba50426..8298c93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,7 +118,7 @@ SET( DOC_INSTALL_DIR
####################################################################
#SET (CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR} SYSTEM )
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/ext ${CMAKE_CURRENT_BINARY_DIR} SYSTEM )
####################################################################
@@ -129,6 +129,7 @@ set ( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -g -O3" )
set ( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -O0" )
ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(ext)
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(applayer)
ADD_SUBDIRECTORY(tests)
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
new file mode 100644
index 0000000..8acf8c6
--- /dev/null
+++ b/ext/CMakeLists.txt
@@ -0,0 +1,17 @@
+SET(libsatsolverext_SRCS
+ pool_fileconflicts.c repo_content.c repo_deltainfoxml.c repo_products.c
+ repo_releasefile_products.c repo_repomdxml.c repo_rpmdb.c repo_rpmmd.c
+ repo_susetags.c repo_updateinfoxml.c repo_write.c repo_zyppdb.c)
+
+ADD_LIBRARY(satsolverext STATIC ${libsatsolverext_SRCS})
+
+SET(libsatsolver_HEADERS
+ pool_fileconflicts.h repo_content.h repo_deltainfoxml.h repo_products.h
+ repo_releasefile_products.h repo_repomdxml.h repo_rpmdb.h repo_rpmmd.h
+ repo_susetags.h repo_updateinfoxml.h repo_write.h repo_zyppdb.h
+ tools_util.h)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+
+INSTALL(FILES ${libsatsolverext_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/satsolver")
+INSTALL(TARGETS satsolverext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
diff --git a/tools/pool_fileconflicts.c b/ext/pool_fileconflicts.c
index 1858df4..1858df4 100644
--- a/tools/pool_fileconflicts.c
+++ b/ext/pool_fileconflicts.c
diff --git a/tools/pool_fileconflicts.h b/ext/pool_fileconflicts.h
index f1c2282..f1c2282 100644
--- a/tools/pool_fileconflicts.h
+++ b/ext/pool_fileconflicts.h
diff --git a/tools/repo_content.c b/ext/repo_content.c
index 4c71c42..4c71c42 100644
--- a/tools/repo_content.c
+++ b/ext/repo_content.c
diff --git a/tools/repo_content.h b/ext/repo_content.h
index c2e79bc..c2e79bc 100644
--- a/tools/repo_content.h
+++ b/ext/repo_content.h
diff --git a/tools/repo_deltainfoxml.c b/ext/repo_deltainfoxml.c
index 6bc0cc9..6bc0cc9 100644
--- a/tools/repo_deltainfoxml.c
+++ b/ext/repo_deltainfoxml.c
diff --git a/tools/repo_deltainfoxml.h b/ext/repo_deltainfoxml.h
index 6621565..6621565 100644
--- a/tools/repo_deltainfoxml.h
+++ b/ext/repo_deltainfoxml.h
diff --git a/tools/repo_products.c b/ext/repo_products.c
index 5cdcc19..5cdcc19 100644
--- a/tools/repo_products.c
+++ b/ext/repo_products.c
diff --git a/tools/repo_products.h b/ext/repo_products.h
index 6f4ce85..6f4ce85 100644
--- a/tools/repo_products.h
+++ b/ext/repo_products.h
diff --git a/tools/repo_releasefile_products.c b/ext/repo_releasefile_products.c
index 2413d20..2413d20 100644
--- a/tools/repo_releasefile_products.c
+++ b/ext/repo_releasefile_products.c
diff --git a/tools/repo_releasefile_products.h b/ext/repo_releasefile_products.h
index 34311ac..34311ac 100644
--- a/tools/repo_releasefile_products.h
+++ b/ext/repo_releasefile_products.h
diff --git a/tools/repo_repomdxml.c b/ext/repo_repomdxml.c
index c6a1ae2..c6a1ae2 100644
--- a/tools/repo_repomdxml.c
+++ b/ext/repo_repomdxml.c
diff --git a/tools/repo_repomdxml.h b/ext/repo_repomdxml.h
index 49d86fb..49d86fb 100644
--- a/tools/repo_repomdxml.h
+++ b/ext/repo_repomdxml.h
diff --git a/tools/repo_rpmdb.c b/ext/repo_rpmdb.c
index 826fa13..826fa13 100644
--- a/tools/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
diff --git a/tools/repo_rpmdb.h b/ext/repo_rpmdb.h
index 3e80302..3e80302 100644
--- a/tools/repo_rpmdb.h
+++ b/ext/repo_rpmdb.h
diff --git a/tools/repo_rpmmd.c b/ext/repo_rpmmd.c
index 18dbf70..18dbf70 100644
--- a/tools/repo_rpmmd.c
+++ b/ext/repo_rpmmd.c
diff --git a/tools/repo_rpmmd.h b/ext/repo_rpmmd.h
index 9b021b2..9b021b2 100644
--- a/tools/repo_rpmmd.h
+++ b/ext/repo_rpmmd.h
diff --git a/tools/repo_susetags.c b/ext/repo_susetags.c
index 66880fc..66880fc 100644
--- a/tools/repo_susetags.c
+++ b/ext/repo_susetags.c
diff --git a/tools/repo_susetags.h b/ext/repo_susetags.h
index a617c65..a617c65 100644
--- a/tools/repo_susetags.h
+++ b/ext/repo_susetags.h
diff --git a/tools/repo_updateinfoxml.c b/ext/repo_updateinfoxml.c
index 5e4b1f8..5e4b1f8 100644
--- a/tools/repo_updateinfoxml.c
+++ b/ext/repo_updateinfoxml.c
diff --git a/tools/repo_updateinfoxml.h b/ext/repo_updateinfoxml.h
index b20bb60..b20bb60 100644
--- a/tools/repo_updateinfoxml.h
+++ b/ext/repo_updateinfoxml.h
diff --git a/tools/repo_write.c b/ext/repo_write.c
index 6d48942..6d48942 100644
--- a/tools/repo_write.c
+++ b/ext/repo_write.c
diff --git a/tools/repo_write.h b/ext/repo_write.h
index fd622d4..fd622d4 100644
--- a/tools/repo_write.h
+++ b/ext/repo_write.h
diff --git a/tools/repo_zyppdb.c b/ext/repo_zyppdb.c
index 13086d9..13086d9 100644
--- a/tools/repo_zyppdb.c
+++ b/ext/repo_zyppdb.c
diff --git a/tools/repo_zyppdb.h b/ext/repo_zyppdb.h
index 8c4a5da..8c4a5da 100644
--- a/tools/repo_zyppdb.h
+++ b/ext/repo_zyppdb.h
diff --git a/tools/tools_util.h b/ext/tools_util.h
index ed7022d..ed7022d 100644
--- a/tools/tools_util.h
+++ b/ext/tools_util.h
diff --git a/package/libsatsolver.spec.in b/package/libsatsolver.spec.in
index 6157f09..5766048 100644
--- a/package/libsatsolver.spec.in
+++ b/package/libsatsolver.spec.in
@@ -160,6 +160,7 @@ rm -rf "$RPM_BUILD_ROOT"
%files devel
%defattr(-,root,root)
%_libdir/libsatsolver.a
+%_libdir/libsatsolverext.a
%_libdir/libappsatsolver.a
%dir /usr/include/satsolver
/usr/include/satsolver/*
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 576dae4..6502f4a 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -2,77 +2,60 @@
# CMakeLists.txt for sat-solver/tools
#
-# Let's not compile the same files ten times; this library is not installed
-ADD_LIBRARY( toolstuff STATIC repo_write.c common_write.c )
+ADD_LIBRARY( toolstuff STATIC common_write.c )
-SET(rpmdb2solv_REPOS
- rpmdb2solv.c
- repo_rpmdb.c
- repo_products.c
- repo_zyppdb.c
- repo_releasefile_products.c
-)
+ADD_EXECUTABLE(rpmdb2solv rpmdb2solv.c)
+TARGET_LINK_LIBRARIES(rpmdb2solv toolstuff satsolverext satsolver ${RPMDB_LIBRARY} ${EXPAT_LIBRARY})
-ADD_EXECUTABLE( rpmdb2solv ${rpmdb2solv_REPOS} )
-TARGET_LINK_LIBRARIES( rpmdb2solv satsolver toolstuff ${RPMDB_LIBRARY} ${EXPAT_LIBRARY})
+ADD_EXECUTABLE(rpms2solv rpms2solv.c)
+TARGET_LINK_LIBRARIES(rpms2solv toolstuff satsolverext satsolver ${RPMDB_LIBRARY})
-SET(rpms2solv_REPOS rpms2solv.c repo_rpmdb.c )
-ADD_EXECUTABLE( rpms2solv ${rpms2solv_REPOS} )
-TARGET_LINK_LIBRARIES( rpms2solv satsolver toolstuff ${RPMDB_LIBRARY})
+ADD_EXECUTABLE(rpmmd2solv rpmmd2solv.c)
+TARGET_LINK_LIBRARIES(rpmmd2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
-SET(rpmmd2solv_REPOS rpmmd2solv.c repo_rpmmd.c )
-ADD_EXECUTABLE( rpmmd2solv ${rpmmd2solv_REPOS} )
-TARGET_LINK_LIBRARIES( rpmmd2solv satsolver toolstuff ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
+ADD_EXECUTABLE(helix2solv helix2solv.c ${helix2solv_REPOS} )
+TARGET_LINK_LIBRARIES(helix2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
-SET(helix2solv_REPOS helix2solv.c )
-ADD_EXECUTABLE( helix2solv ${helix2solv_REPOS} )
-TARGET_LINK_LIBRARIES( helix2solv satsolver toolstuff ${EXPAT_LIBRARY})
+ADD_EXECUTABLE(susetags2solv susetags2solv.c)
+TARGET_LINK_LIBRARIES(susetags2solv toolstuff satsolverext satsolver ${ZLIB_LIBRARY})
-SET(susetags2solv_REPOS susetags2solv.c repo_susetags.c repo_content.c )
-ADD_EXECUTABLE( susetags2solv ${susetags2solv_REPOS} )
-TARGET_LINK_LIBRARIES( susetags2solv satsolver toolstuff ${ZLIB_LIBRARY})
+ADD_EXECUTABLE(updateinfoxml2solv updateinfoxml2solv.c)
+TARGET_LINK_LIBRARIES(updateinfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
-SET(updateinfoxml2solv_REPOS updateinfoxml2solv.c repo_updateinfoxml.c)
-ADD_EXECUTABLE( updateinfoxml2solv ${updateinfoxml2solv_REPOS} )
-TARGET_LINK_LIBRARIES( updateinfoxml2solv satsolver toolstuff ${EXPAT_LIBRARY})
+ADD_EXECUTABLE(deltainfoxml2solv deltainfoxml2solv.c)
+TARGET_LINK_LIBRARIES(deltainfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
-SET(deltainfoxml2solv_REPOS deltainfoxml2solv.c repo_deltainfoxml.c)
-ADD_EXECUTABLE( deltainfoxml2solv ${deltainfoxml2solv_REPOS} )
-TARGET_LINK_LIBRARIES( deltainfoxml2solv satsolver toolstuff ${EXPAT_LIBRARY})
+ADD_EXECUTABLE(repomdxml2solv repomdxml2solv.c)
+TARGET_LINK_LIBRARIES(repomdxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
-SET(repomdxml2solv_REPOS repomdxml2solv.c repo_repomdxml.c)
-ADD_EXECUTABLE( repomdxml2solv ${repomdxml2solv_REPOS} )
-TARGET_LINK_LIBRARIES( repomdxml2solv satsolver toolstuff ${EXPAT_LIBRARY})
+ADD_EXECUTABLE(installcheck installcheck.c)
+TARGET_LINK_LIBRARIES(installcheck satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
-SET(installcheck_SOURCES installcheck.c repo_rpmmd.c repo_susetags.c)
-ADD_EXECUTABLE(installcheck ${installcheck_SOURCES})
-TARGET_LINK_LIBRARIES(installcheck satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
+ADD_EXECUTABLE(patchcheck patchcheck.c)
+TARGET_LINK_LIBRARIES(patchcheck satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
-SET(patchcheck_SOURCES patchcheck.c repo_rpmmd.c repo_susetags.c repo_updateinfoxml.c)
-ADD_EXECUTABLE(patchcheck ${patchcheck_SOURCES})
-TARGET_LINK_LIBRARIES(patchcheck satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
+ADD_EXECUTABLE(dumpsolv dumpsolv.c )
+TARGET_LINK_LIBRARIES(dumpsolv satsolver)
-ADD_EXECUTABLE( dumpsolv dumpsolv.c )
-TARGET_LINK_LIBRARIES( dumpsolv satsolver)
+ADD_EXECUTABLE(mergesolv mergesolv.c )
+TARGET_LINK_LIBRARIES(mergesolv toolstuff satsolverext satsolver)
-ADD_EXECUTABLE( mergesolv mergesolv.c )
-TARGET_LINK_LIBRARIES( mergesolv satsolver toolstuff)
-
-SET(findfileconflicts_SOURCES findfileconflicts.c pool_fileconflicts.c repo_rpmdb.c )
-ADD_EXECUTABLE( findfileconflicts ${findfileconflicts_SOURCES} )
-TARGET_LINK_LIBRARIES( findfileconflicts satsolver ${RPMDB_LIBRARY} ${EXPAT_LIBRARY} )
+ADD_EXECUTABLE(findfileconflicts findfileconflicts.c)
+TARGET_LINK_LIBRARIES(findfileconflicts satsolverext satsolver ${RPMDB_LIBRARY})
install(TARGETS
- mergesolv
- dumpsolv
- susetags2solv
- helix2solv
- rpmmd2solv
- rpmdb2solv
- rpms2solv
- updateinfoxml2solv
- deltainfoxml2solv
- repomdxml2solv
- DESTINATION ${BIN_INSTALL_DIR} )
-
-install(PROGRAMS repo2solv.sh DESTINATION ${BIN_INSTALL_DIR} )
+ mergesolv
+ dumpsolv
+ susetags2solv
+ helix2solv
+ rpmmd2solv
+ rpmdb2solv
+ rpms2solv
+ updateinfoxml2solv
+ deltainfoxml2solv
+ repomdxml2solv
+ DESTINATION ${BIN_INSTALL_DIR})
+
+install(PROGRAMS
+ repo2solv.sh
+ DESTINATION ${BIN_INSTALL_DIR})