From e679b515eddb3dd340fb25620de0160211f40fdc Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Tue, 4 Dec 2018 14:04:28 +0900 Subject: Imported Upstream version 0.6.35 Change-Id: Ib7359aa10c08c1469105fbd6a82ea922f46f8b51 Signed-off-by: DongHun Kwak --- CMakeLists.txt | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2557f0a..8c6a1be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,17 +33,11 @@ OPTION (MULTI_SEMANTICS "Build with support for multiple distribution types?" OF OPTION (ENABLE_LZMA_COMPRESSION "Build with lzma/xz compression support?" OFF) OPTION (ENABLE_BZIP2_COMPRESSION "Build with bzip2 compression support?" OFF) +OPTION (ENABLE_ZSTD_COMPRESSION "Build with zstd compression support?" OFF) +OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF) OPTION (WITH_LIBXML2 "Build with libxml2 instead of libexpat?" OFF) -#IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4) -#ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4) - -IF (COMMAND cmake_policy) - # escape preprocessor, see -DVERSION below - CMAKE_POLICY (SET CMP0005 OLD) -ENDIF (COMMAND cmake_policy) - # Library IF (DEFINED LIB) SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}") @@ -162,6 +156,10 @@ IF (ENABLE_ARCHREPO OR ENABLE_DEBIAN) SET (ENABLE_LZMA_COMPRESSION ON) ENDIF (ENABLE_ARCHREPO OR ENABLE_DEBIAN) +IF (ENABLE_ZCHUNK_COMPRESSION) +SET (ENABLE_ZSTD_COMPRESSION ON) +ENDIF (ENABLE_ZCHUNK_COMPRESSION) + IF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO) IF (WITH_LIBXML2 ) FIND_PACKAGE (LibXml2 REQUIRED) @@ -184,6 +182,10 @@ IF (ENABLE_BZIP2_COMPRESSION) FIND_PACKAGE (BZip2 REQUIRED) ENDIF (ENABLE_BZIP2_COMPRESSION) +IF (ENABLE_ZSTD_COMPRESSION) +FIND_LIBRARY (ZSTD_LIBRARY NAMES zstd) +ENDIF (ENABLE_ZSTD_COMPRESSION) + IF (RPM5) MESSAGE (STATUS "Enabling RPM 5 support") ADD_DEFINITIONS (-DRPM5) @@ -292,7 +294,7 @@ FOREACH (VAR ENABLE_SUSEREPO ENABLE_COMPS ENABLE_TESTCASE_HELIXREPO ENABLE_HELIXREPO ENABLE_MDKREPO ENABLE_ARCHREPO ENABLE_DEBIAN ENABLE_HAIKU ENABLE_ZLIB_COMPRESSION ENABLE_LZMA_COMPRESSION ENABLE_BZIP2_COMPRESSION - ENABLE_PGPVRFY ENABLE_APPDATA) + ENABLE_ZSTD_COMPRESSION ENABLE_ZCHUNK_COMPRESSION ENABLE_PGPVRFY ENABLE_APPDATA) IF(${VAR}) ADD_DEFINITIONS (-D${VAR}=1) SET (SWIG_FLAGS ${SWIG_FLAGS} -D${VAR}) @@ -305,7 +307,6 @@ SET (PACKAGE "libsolv") SET (VERSION "${LIBSOLV_MAJOR}.${LIBSOLV_MINOR}.${LIBSOLV_PATCH}") ADD_DEFINITIONS (-D_FILE_OFFSET_BITS=64) -ADD_DEFINITIONS (-DVERSION=\\\"${VERSION}\\\") CONFIGURE_FILE (src/solvversion.h.in src/solvversion.h) SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Package dependency solver library") @@ -395,6 +396,9 @@ ENDIF (ENABLE_LZMA_COMPRESSION) IF (ENABLE_BZIP2_COMPRESSION) SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${BZIP2_LIBRARIES}) ENDIF (ENABLE_BZIP2_COMPRESSION) +IF (ENABLE_ZSTD_COMPRESSION) +SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${ZSTD_LIBRARY}) +ENDIF (ENABLE_ZSTD_COMPRESSION) IF (ENABLE_RPMDB) SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES}) ENDIF (ENABLE_RPMDB) -- cgit v1.2.3