OPTION (ENABLE_BUILD_TRANS "Build translation files by default?" OFF)
OPTION (ENABLE_BUILD_TESTS "Build and run test suite by default?" OFF)
OPTION (ENABLE_USE_THREADS "Enable using threads (NOT being used by threads!)?" OFF)
+OPTION (ENABLE_ZSTD_COMPRESSION "Build with zstd compression support?" OFF)
OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF)
OPTION (DISABLE_MEDIABACKEND_TESTS "Disable Tests depending on Nginx and libfcgi?" OFF)
CONFIGURE_FILE ( zypp/APIConfig.h.in zypp/APIConfig.h )
SET (CMAKE_CXX_STANDARD ${ZYPPCOMMON_CXX_STANDARD})
+SET (CMAKE_CXX_EXTENSIONS OFF)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
CHECK_C_COMPILER_FLAG("-Werror=format-security" CC_FORMAT_SECURITY)
ENDIF( NOT ZLIB_FOUND)
+FIND_PACKAGE(YAML-CPP REQUIRED)
+IF ( NOT YAML-CPP_FOUND)
+ MESSAGE( FATAL_ERROR " yaml-cpp not found" )
+ELSE ( NOT YAML-CPP_FOUND)
+ INCLUDE_DIRECTORIES(${YAML_CPP_INCLUDE_DIR})
+ENDIF( NOT YAML-CPP_FOUND)
+
+
+
#Allow to override the libsolv install location
IF( LIBSOLV_SRCDIR AND LIBSOLV_BUILDDIR )
execute_process(
)
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR}/libsolv/include ${CMAKE_BINARY_DIR}/libsolv/ext ${CMAKE_BINARY_DIR}/libsolv/solvversion ${CMAKE_BINARY_DIR}/libsolv/solvversion/solv ${CMAKE_BINARY_DIR}/libsolv/ext/solv ${CMAKE_BINARY_DIR}/libsolv/include/solv )
- SET( LibSolv_LIBRARIES ${LIBSOLV_BUILDDIR}/src/libsolv.a ${LIBSOLV_BUILDDIR}/ext/libsolvext.a )
+ SET( LibSolv_LIBRARIES ${LIBSOLV_BUILDDIR}/ext/libsolvext.a ${LIBSOLV_BUILDDIR}/src/libsolv.a )
ELSE()
FIND_PACKAGE(LibSolv REQUIRED ext)
MESSAGE( FATAL_ERROR " libsolv not found" )
ELSE()
INCLUDE_DIRECTORIES( ${LibSolv_INCLUDE_DIRS} )
+ # static case: Assert libsolv.a ist the last one linked
+ SET(LibSolv_LIBRARIES ${LibSolv_LIBRARIES} ${LIBSOLV_LIBRARY})
ENDIF()
ENDIF( LIBSOLV_SRCDIR AND LIBSOLV_BUILDDIR )
MESSAGE( STATUS "doxygen found: ${DOXYGEN}" )
ENDIF ( NOT DOXYGEN )
+# By now just libsolvs external references require us to link against it:
+IF (ENABLE_ZSTD_COMPRESSION)
+ MESSAGE("Building with zstd support enabled.")
+ FIND_LIBRARY (ZSTD_LIBRARY NAMES zstd)
+ FIND_PATH (ZSTD_INCLUDE_DIRS zstd.h)
+ #INCLUDE_DIRECTORIES (${ZSTD_INCLUDE_DIRS})
+ENDIF (ENABLE_ZSTD_COMPRESSION)
+
IF (ENABLE_ZCHUNK_COMPRESSION)
MESSAGE("Building with zchunk support enabled.")
PKG_CHECK_MODULES (ZCHUNK zck REQUIRED)