-####################################################################
-# SOURCES #
-####################################################################
+# Collect all files that may contain translatable texts
+FILE( GLOB_RECURSE POT_FILE_DEPENDS RELATIVE ${LIBZYPP_SOURCE_DIR} "*.h" "*.cc" )
+SET( POT_FILE_DEPENDS ${POT_FILE_DEPENDS} PARENT_SCOPE )
-ADD_DEFINITIONS(-DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale" -DTEXTDOMAIN="zypp" -DZYPP_DLL )
-# 2012-12-03: HistoryLogReader: deprecate old API based in HistoryItem; use HistoryLogData based one
-ADD_DEFINITIONS(-DWITH_DEPRECATED_HISTORYITEM_API=1)
+ADD_DEFINITIONS(-DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale" -DTEXTDOMAIN="zypp" -DZYPP_DLL )
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+IF (ENABLE_ZCHUNK_COMPRESSION)
+ INCLUDE_DIRECTORIES( ${ZCHUNK_INCLUDEDIR} )
+ENDIF(ENABLE_ZCHUNK_COMPRESSION)
#FILE(WRITE filename "message to write"... )
SET( zypp_SRCS
+ Application.cc
ByteCount.cc
Capabilities.cc
Capability.cc
CapMatch.cc
Changelog.cc
CheckSum.cc
+ CpeId.cc
Date.cc
Dep.cc
Digest.cc
- DiskUsage.cc
DiskUsageCounter.cc
DownloadMode.cc
Edition.cc
PluginFrameException.cc
PluginScript.cc
PluginScriptException.cc
+ PluginExecutor.cc
Fetcher.cc
FileChecker.cc
Glob.cc
HistoryLogData.cc
IdString.cc
InstanceId.cc
+ KeyManager.cc
KeyRing.cc
Locks.cc
- MediaProducts.cc
MediaSetAccess.cc
OnMediaLocation.cc
Package.cc
ProgressData.cc
ProvideFilePolicy.cc
PublicKey.cc
+ PurgeKernels.cc
Range.cc
Rel.cc
RepoInfo.cc
ResObject.cc
Resolvable.cc
Resolver.cc
+ ResolverFocus.cc
ResolverProblem.cc
ResPool.cc
ResPoolProxy.cc
ServiceInfo.cc
Signature.cc
SrcPackage.cc
+ ShutdownLock.cc
SysContent.cc
Target.cc
TmpPath.cc
)
SET( zypp_HEADERS
- APIConfig.h
+ ${CMAKE_CURRENT_BINARY_DIR}/APIConfig.h
+ Application.h
Arch.h
AutoDispose.h
Bit.h
+ Bitmap.h
ByteCount.h
Callback.h
Capabilities.h
CapMatch.h
Changelog.h
CheckSum.h
+ ContentType.h
CountryCode.h
+ CpeId.h
Date.h
Dep.h
Digest.h
DiskUsageCounter.h
- DiskUsage.h
DownloadMode.h
Edition.h
ExternalProgram.h
PluginFrameException.h
PluginScript.h
PluginScriptException.h
+ PluginExecutor.h
Fetcher.h
FileChecker.h
Glob.h
IdStringType.h
InstanceId.h
KeyContext.h
+ KeyManager.h
KeyRing.h
KVMap.h
LanguageCode.h
ProgressData.h
ProvideFilePolicy.h
PublicKey.h
+ PurgeKernels.h
Range.h
RelCompare.h
Rel.h
ResObjects.h
Resolvable.h
Resolver.h
+ ResolverFocus.h
+ ResolverNamespace.h
ResolverProblem.h
ResPool.h
ResPoolProxy.h
TmpPath.h
TriBool.h
Url.h
+ UserData.h
VendorAttr.h
VendorSupportOptions.h
ZConfig.h
ZYpp.h
)
-INSTALL( FILES ${zypp_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/zypp" )
+INSTALL( FILES ${zypp_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/zypp" )
SET( zypp_base_SRCS
- base/InterProcessMutex.cc
base/Backtrace.cc
+ base/CleanerThread.cc
+ base/DrunkenBishop.cc
base/SerialNumber.cc
base/Random.cc
base/Measure.cc
- base/Fd.cc
base/Gettext.cc
base/GzStream.cc
base/IOStream.cc
base/InputStream.cc
base/ReferenceCounted.cc
+ base/SetRelationMixin.cc
base/String.cc
base/StrMatcher.h
base/StrMatcher.cc
base/Sysconfig.cc
base/ProfilingFormater.cc
base/LogControl.cc
+ base/Xml.cc
)
SET( zypp_base_HEADERS
- base/InterProcessMutex.h
base/Backtrace.h
base/Collector.h
+ base/DrunkenBishop.h
base/SerialNumber.h
base/Easy.h
+ base/Env.h
base/Errno.h
+ base/fXstream.h
base/Random.h
base/Algorithm.h
base/Counter.h
base/DtorReset.h
base/Exception.h
base/UserRequestException.h
+ base/EnumClass.h
base/ExternalDataSource.h
- base/Fd.h
base/Flags.h
base/Function.h
base/Functional.h
base/Gettext.h
base/GzStream.h
+ base/Hash.h
base/IOStream.h
base/InputStream.h
+ base/Iterable.h
base/Iterator.h
+ base/Json.h
+ base/LocaleGuard.h
base/LogControl.h
base/LogTools.h
base/Logger.h
base/ProvideNumericId.h
base/PtrTypes.h
base/ReferenceCounted.h
- base/SafeBool.h
+ base/SetRelationMixin.h
+ base/SetTracker.h
base/Signal.h
+ base/SimpleStreambuf.h
base/String.h
base/StrMatcher.h
base/Regex.h
base/Sysconfig.h
- base/Tr1hash.h
+ base/TypeTraits.h
base/Unit.h
+ base/ValueTransform.h
base/WatchFile.h
+ base/Xml.h
)
+IF (ENABLE_ZCHUNK_COMPRESSION)
+
+ list( APPEND zypp_base_SRCS
+ base/ZckStream.cc
+ )
+
+ list( APPEND zypp_base_HEADERS
+ base/ZckStream.h
+ )
+
+ENDIF(ENABLE_ZCHUNK_COMPRESSION)
+
INSTALL( FILES
${zypp_base_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/base
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/base
)
SET( zypp_media_SRCS
+ media/CurlHelper.cc
media/MediaException.cc
media/MediaAccess.cc
media/MediaHandler.cc
media/ProxyInfo.cc
media/MediaCurl.cc
media/MediaMultiCurl.cc
- media/MediaAria2c.cc
media/MediaISO.cc
media/MediaPlugin.cc
media/MediaSource.cc
media/MediaCIFS.h
media/MediaCurl.h
media/MediaMultiCurl.h
- media/MediaAria2c.h
media/MediaDIR.h
media/MediaDISK.h
media/MediaException.h
INSTALL( FILES
${zypp_media_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/media
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/media
)
IF ( LIBPROXY_FOUND )
INSTALL( FILES
${zypp_media_proxyinfo_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/media/proxyinfo
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/media/proxyinfo
)
SET( zypp_parser_SRCS
INSTALL( FILES
${zypp_parser_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser
)
SET( zypp_parser_susetags_SRCS
INSTALL( FILES
${zypp_parser_susetags_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/susetags
-)
-
-SET( zypp_parser_plaindir_SRCS
- parser/plaindir/RepoParser.cc
-)
-
-SET( zypp_parser_plaindir_HEADERS
- parser/plaindir/RepoParser.h
-)
-
-INSTALL( FILES
- ${zypp_parser_plaindir_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/plaindir
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/susetags
)
SET( zypp_parser_xml_SRCS
INSTALL( FILES
${zypp_parser_xml_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/xml
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/xml
)
SET( zypp_parser_yum_SRCS
parser/yum/RepomdFileReader.cc
- parser/yum/PatchesFileReader.cc
)
SET( zypp_parser_yum_HEADERS
parser/yum/RepomdFileReader.h
- parser/yum/PatchesFileReader.h
)
INSTALL( FILES
${zypp_parser_yum_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/yum
-)
-
-SET( zypp_parser_ws_SRCS
- parser/ws/WebpinResultFileReader.cc
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/yum
)
-SET( zypp_parser_ws_HEADERS
- parser/ws/WebpinResultFileReader.h
-)
-
-INSTALL( FILES
- ${zypp_parser_ws_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/ws
-)
-
-
SET( zypp_pool_SRCS
pool/PoolImpl.cc
pool/PoolStats.cc
INSTALL( FILES
${zypp_pool_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/pool
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/pool
+)
+
+# SET( zypp_solver_detail_SRCS )
+
+SET( zypp_solver_HEADERS
+ solver/Types.h
+)
+
+INSTALL( FILES
+ ${zypp_solver_HEADERS}
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/solver
)
SET( zypp_solver_detail_SRCS
- solver/detail/Helper.cc
solver/detail/ProblemSolutionIgnore.cc
solver/detail/ProblemSolutionCombi.cc
solver/detail/Resolver.cc
)
SET( zypp_solver_detail_HEADERS
- solver/detail/Helper.h
solver/detail/ProblemSolutionIgnore.h
solver/detail/ProblemSolutionCombi.h
solver/detail/Resolver.h
solver/detail/SolverQueueItemUpdate.h
solver/detail/SolverQueueItemInstallOneOf.h
solver/detail/SolverQueueItemLock.h
+ solver/detail/ItemCapKind.h
solver/detail/SATResolver.h
solver/detail/SystemCheck.h
)
INSTALL( FILES
${zypp_solver_detail_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/solver/detail
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/solver/detail
)
SET( zypp_sat_SRCS
sat/Pool.cc
sat/Solvable.cc
sat/SolvableSet.cc
+ sat/SolvableSpec.cc
sat/SolvIterMixin.cc
sat/Map.cc
sat/Queue.cc
+ sat/FileConflicts.cc
sat/Transaction.cc
sat/WhatProvides.cc
sat/WhatObsoletes.cc
sat/Pool.h
sat/Solvable.h
sat/SolvableSet.h
+ sat/SolvableType.h
+ sat/SolvableSpec.h
sat/SolvIterMixin.h
sat/Map.h
sat/Queue.h
+ sat/FileConflicts.h
sat/Transaction.h
sat/WhatProvides.h
sat/WhatObsoletes.h
INSTALL( FILES
${zypp_sat_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/sat
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/sat
)
SET( zypp_sat_detail_SRCS
INSTALL( FILES
${zypp_sat_detail_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/sat/detail
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/sat/detail
)
SET( zypp_target_SRCS
+ target/RpmPostTransCollector.cc
target/RequestedLocalesFile.cc
- target/SoftLocksFile.cc
+ target/SolvIdentFile.cc
target/HardLocksFile.cc
target/CommitPackageCache.cc
target/CommitPackageCacheImpl.cc
target/TargetCallbackReceiver.cc
target/TargetException.cc
target/TargetImpl.cc
+ target/TargetImpl.commitFindFileConflicts.cc
+
)
SET( zypp_target_HEADERS
+ target/RpmPostTransCollector.h
target/RequestedLocalesFile.h
- target/SoftLocksFile.h
+ target/SolvIdentFile.h
target/HardLocksFile.h
target/CommitPackageCache.h
target/CommitPackageCacheImpl.h
INSTALL( FILES
${zypp_target_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/target
)
-IF(NOT UDEV_FOUND)
-IF(HAL_FOUND)
-SET( zypp_target_hal_SRCS
- target/hal/HalContext.cc
-)
-SET( zypp_target_hal_HEADERS
- target/hal/HalContext.h
- target/hal/HalException.h
-)
-ENDIF(HAL_FOUND)
-ENDIF(NOT UDEV_FOUND)
-# as HAL is deprecated, we don't install headers
-
SET( zypp_target_modalias_SRCS
target/modalias/Modalias.cc
)
INSTALL( FILES
${zypp_target_modalias_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/modalias
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/target/modalias
)
SET( zypp_target_rpm_SRCS
target/rpm/RpmException.cc
target/rpm/RpmHeader.cc
target/rpm/librpmDb.cc
- target/rpm/librpmDb.cv3.cc
)
SET( zypp_target_rpm_HEADERS
INSTALL( FILES
${zypp_target_rpm_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/rpm
-)
-
-SET( zypp_thread_SRCS
- thread/Mutex.cc
-)
-
-SET( zypp_thread_HEADERS
- thread/Mutex.h
- thread/MutexException.h
- thread/MutexLock.h
- thread/Once.h
-)
-
-INSTALL( FILES
- ${zypp_thread_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/thread
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/target/rpm
)
SET( zypp_ui_SRCS
INSTALL( FILES
${zypp_ui_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/ui
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/ui
)
SET( zypp_url_SRCS
INSTALL( FILES
${zypp_url_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/url
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/url
)
SET( zypp_zypp_detail_SRCS
INSTALL( FILES
${zypp_zypp_detail_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/zypp_detail
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/zypp_detail
)
SET( zypp_repo_SRCS
repo/Downloader.h
repo/RepoVariables.h
repo/RepoInfoBase.h
- repo/RepoInfoBaseImpl.h
repo/PluginServices.h
repo/ServiceRepos.h
)
INSTALL( FILES
${zypp_repo_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/repo
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/repo
)
SET( zypp_repo_yum_SRCS
repo/yum/Downloader.cc
- repo/yum/ResourceType.cc
)
SET( zypp_repo_yum_HEADERS
repo/yum/Downloader.h
- repo/yum/ResourceType.h
)
SET( zypp_repo_susetags_SRCS
repo/susetags/Downloader.h
)
-SET( zypp_ws_SRCS
- ws/WebpinResult.cc
-)
-
-SET( zypp_ws_HEADERS
- ws/WebpinResult.h
-)
-
####################################################################
SET( zypp_misc_HEADERS
INSTALL( FILES
${zypp_misc_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/misc
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/misc
)
####################################################################
+add_subdirectory( zyppng )
+
SET( zypp_lib_SRCS
${zypp_misc_SRCS}
${zypp_pool_SRCS}
${zypp_parser_susetags_SRCS}
${zypp_parser_xml_SRCS}
${zypp_parser_yum_SRCS}
-${zypp_parser_plaindir_SRCS}
-${zypp_parser_ws_SRCS}
${zypp_parser_SRCS}
${zypp_media_proxyinfo_SRCS}
${zypp_media_SRCS}
${zypp_target_SRCS}
${zypp_solver_detail_SRCS}
${zypp_ui_SRCS}
-${zypp_thread_SRCS}
-${zypp_ws_SRCS}
${zypp_SRCS}
${zypp_zypp_detail_SRCS}
${zypp_sat_SRCS}
${zypp_sat_detail_SRCS}
${zypp_EARLY_SRCS}
${zypp_base_SRCS}
+${zyppng_SRCS}
)
SET( zypp_lib_HEADERS
${zypp_parser_tagfile_HEADERS}
${zypp_parser_susetags_HEADERS}
${zypp_parser_yum_HEADERS}
-${zypp_parser_plaindir_HEADERS}
${zypp_parser_xml_HEADERS}
-${zypp_parser_ws_HEADERS}
${zypp_parser_HEADERS}
${zypp_ui_HEADERS}
${zypp_media_HEADERS}
${zypp_media_proxyinfo_HEADERS}
${zypp_base_HEADERS}
+${zypp_solver_HEADERS}
${zypp_solver_detail_HEADERS}
${zypp_sat_HEADERS}
${zypp_sat_detail_HEADERS}
${zypp_url_HEADERS}
-${zypp_ws_HEADERS}
${zypp_HEADERS}
${zypp_zypp_detail_HEADERS}
-${zypp_thread_HEADERS}
${zypp_repo_HEADERS}
${zypp_source_susetags_HEADERS}
${zypp_target_modalias_HEADERS}
${zypp_target_HEADERS}
${zypp_pool_HEADERS}
${zypp_misc_HEADERS}
+${zyppng_HEADERS}
)
#
#SET_LOGGROUP( "group" ${zypp_parser_SRCS} )
#SET_LOGGROUP( "group" ${zypp_SRCS} )
#SET_LOGGROUP( "group" ${zypp_zypp_detail_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_thread_SRCS} )
#SET_LOGGROUP( "group" ${zypp_source_susetags_SRCS} )
#SET_LOGGROUP( "group" ${zypp_target_modalias_SRCS} )
#SET_LOGGROUP( "group" ${zypp_target_SRCS} )
#SET_LOGGROUP( "group" ${zypp_parser_yum_SRCS} )
#SET_LOGGROUP( "group" ${zypp_pool_SRCS} )
-
-ADD_LIBRARY(zypp SHARED ${zypp_lib_SRCS})
-SET_TARGET_PROPERTIES( zypp PROPERTIES VERSION "${LIBZYPP_VERSION_INFO}" )
-SET_TARGET_PROPERTIES( zypp PROPERTIES SOVERSION "${LIBZYPP_SOVERSION_INFO}" )
-SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libzypp.map")
-ADD_DEPENDENCIES(zypp schema_header)
-# System libraries
-SET(UTIL_LIBRARY util)
-TARGET_LINK_LIBRARIES(zypp ${UTIL_LIBRARY} )
-TARGET_LINK_LIBRARIES(zypp ${RPM_LIBRARY} )
-TARGET_LINK_LIBRARIES(zypp ${GETTEXT_LIBRARIES} )
-TARGET_LINK_LIBRARIES(zypp ${CURL_LIBRARY} )
-TARGET_LINK_LIBRARIES(zypp ${LIBXML_LIBRARY} )
-TARGET_LINK_LIBRARIES(zypp ${ZLIB_LIBRARY} )
-TARGET_LINK_LIBRARIES(zypp ${LibSolv_LIBRARIES} ${EXPAT_LIBRARY})
-TARGET_LINK_LIBRARIES(zypp ${OPENSSL_LIBRARIES} )
-TARGET_LINK_LIBRARIES(zypp ${CRYPTO_LIBRARIES} )
-TARGET_LINK_LIBRARIES(zypp ${SIGNALS_LIBRARY} )
-
-IF ( UDEV_FOUND )
- TARGET_LINK_LIBRARIES(zypp ${UDEV_LIBRARY} )
-ELSE ( UDEV_FOUND )
- IF ( HAL_FOUND )
- TARGET_LINK_LIBRARIES(zypp ${HAL_LIBRARY} ${HAL_STORAGE_LIBRARY} ${DBUS_LIBRARY} )
- ENDIF ( HAL_FOUND )
-ENDIF ( UDEV_FOUND )
-
-TARGET_LINK_LIBRARIES(zypp ${LIBPROXY_LIBRARIES} )
+ADD_LIBRARY( zypp-objlib OBJECT ${zypp_lib_SRCS} ${zypp_lib_HEADERS} )
+
+macro( ADDZYPPLIB LIBNAME )
+ message( "ADDING lib ${LIBNAME} to project" )
+ ADD_LIBRARY(${LIBNAME} SHARED $<TARGET_OBJECTS:zypp-objlib> )
+ SET_TARGET_PROPERTIES( ${LIBNAME} PROPERTIES VERSION "${LIBZYPP_VERSION_INFO}" )
+ SET_TARGET_PROPERTIES( ${LIBNAME} PROPERTIES SOVERSION "${LIBZYPP_SOVERSION_INFO}" )
+ # System libraries
+ SET(UTIL_LIBRARY util)
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${UTIL_LIBRARY} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${RPM_LIBRARY} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${GETTEXT_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${CURL_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${LIBXML2_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${ZLIB_LIBRARY} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${LibSolv_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${OPENSSL_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${CRYPTO_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${SIGNALS_LIBRARY})
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${Boost_THREAD_LIBRARY})
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${GPGME_PTHREAD_LIBRARIES})
+ target_link_libraries(${LIBNAME} ${SIGCPP_LIBRARIES})
+ target_link_libraries(${LIBNAME} ${LIBGLIB_LIBRARIES})
+
+ IF (ENABLE_ZCHUNK_COMPRESSION)
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${ZCHUNK_LDFLAGS})
+ ENDIF(ENABLE_ZCHUNK_COMPRESSION)
+
+ IF ( UDEV_FOUND )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${UDEV_LIBRARY} )
+ ELSE ( UDEV_FOUND )
+ IF ( HAL_FOUND )
+ TARGET_LINK_LIBRARIES(${LIBNAME} ${HAL_LIBRARY} ${HAL_STORAGE_LIBRARY} ${DBUS_LIBRARY} )
+ ENDIF ( HAL_FOUND )
+ ENDIF ( UDEV_FOUND )
+
+ TARGET_LINK_LIBRARIES( ${LIBNAME} ${LIBPROXY_LIBRARIES} )
+
+endmacro()
+
+#Release library stripped from most symbols, thats what we release to the packages
+ADDZYPPLIB(zypp)
+set_target_properties ( zypp PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libzypp.map" )
INSTALL(TARGETS zypp LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
+#library build just for using it in tests, contains all symbols
+ADDZYPPLIB(zypp-allsym)
+
+#this part does nothing yet, only when switching away from using a map file to
+#a approach where symbols are exported explicitely it would make a difference
+#ZYPPNG symbols need to be added to the map file to be exported
+IF( EXPORT_NG_API )
+ADD_DEFINITIONS(-DEXPORT_EXPERIMENTAL_API)
+INCLUDE(GenerateExportHeader)
+message("Exporting experimental libzypp-ng API")
+GENERATE_EXPORT_HEADER(
+ zypp
+ BASE_NAME zypp-ng
+ PREFIX_NAME LIB
+)
+ENDIF ( EXPORT_NG_API )
+
# install XML schemas
FILE( GLOB YUM_SCHEMA_FILES ${LIBZYPP_SOURCE_DIR}/zypp/parser/yum/schema/*.rng )
INSTALL(FILES ${YUM_SCHEMA_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/zypp/schema/yum" )
+
+ADD_CUSTOM_TARGET ( buildmon
+ COMMAND test ! -x ./buildmon || ./buildmon
+)
+
+ADD_CUSTOM_COMMAND (
+ TARGET zypp POST_BUILD
+ COMMAND test ! -x ./buildmon || ./buildmon
+)