From e40afe10f0d8783c672a9c3f269d4f60220c9167 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 18 Feb 2014 18:14:53 +0000 Subject: [PATCH] Move xxhash to contrib. Conflicts: CMakeLists.txt src/CMakeLists.txt --- CMakeLists.txt | 9 +++++---- contrib/xxhash/CMakeLists.txt | 3 +++ {src/ucl/src => contrib/xxhash}/xxhash.c | 0 {src/ucl/src => contrib/xxhash}/xxhash.h | 0 debian/copyright | 2 +- src/ucl/CMakeLists.txt | 4 ++-- 6 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 contrib/xxhash/CMakeLists.txt rename {src/ucl/src => contrib/xxhash}/xxhash.c (100%) rename {src/ucl/src => contrib/xxhash}/xxhash.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 696ec254f..99bc24374 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -440,12 +440,12 @@ IF(OPENSSL_FOUND) INCLUDE_DIRECTORIES("${OPENSSL_INCLUDE_DIR}") ENDIF(OPENSSL_FOUND) -ProcessPackage(GLIB2 glib-2.0>=2.12) +ProcessPackage(GLIB2 glib-2.0>=2.16) ProcessPackage(GTHREAD gthread-2.0) IF(ENABLE_HIREDIS MATCHES "ON") # Try to find hiredis library - ProcessPackage(HIREDIS hiredis) + ProcessPackage(HIREDIS libhiredis) ENDIF(ENABLE_HIREDIS MATCHES "ON") ProcessPackage(GMIME2 gmime-2.6 gmime-2.4 gmime-2.0) @@ -850,7 +850,8 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}/src" "${CMAKE_SOURCE_DIR}/src/ucl/include" "${CMAKE_SOURCE_DIR}/contrib/uthash" - "${CMAKE_SOURCE_DIR}/contrib/http-parser") + "${CMAKE_SOURCE_DIR}/contrib/http-parser" + "${CMAKE_SOURCE_DIR}/contrib/libottery") SET(RSPAMDSRC src/modules.c src/controller.c @@ -886,7 +887,7 @@ IF(NOT HIREDIS_FOUND) INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/contrib/hiredis") ENDIF(NOT HIREDIS_FOUND) - +ADD_SUBDIRECTORY(contrib/xxhash) ADD_SUBDIRECTORY(src/lua) ADD_SUBDIRECTORY(src/json) ADD_SUBDIRECTORY(src/cdb) diff --git a/contrib/xxhash/CMakeLists.txt b/contrib/xxhash/CMakeLists.txt new file mode 100644 index 000000000..2cc0234d8 --- /dev/null +++ b/contrib/xxhash/CMakeLists.txt @@ -0,0 +1,3 @@ +SET(XXHASHSRC xxhash.c) + +ADD_LIBRARY(xxhash STATIC ${XXHASHSRC}) \ No newline at end of file diff --git a/src/ucl/src/xxhash.c b/contrib/xxhash/xxhash.c similarity index 100% rename from src/ucl/src/xxhash.c rename to contrib/xxhash/xxhash.c diff --git a/src/ucl/src/xxhash.h b/contrib/xxhash/xxhash.h similarity index 100% rename from src/ucl/src/xxhash.h rename to contrib/xxhash/xxhash.h diff --git a/debian/copyright b/debian/copyright index 2444ed3f1..c7c185af1 100644 --- a/debian/copyright +++ b/debian/copyright @@ -42,7 +42,7 @@ Files: contrib/libottery/* Copyright: Nick Mathewson License: CC0 -Files: src/ucl/src/xxhash.* +Files: contrib/xxhash/xxhash.* Copyright: 2012-2013, Yann Collet. License: BSD-2-Clause diff --git a/src/ucl/CMakeLists.txt b/src/ucl/CMakeLists.txt index cbceff4db..e1df6890e 100644 --- a/src/ucl/CMakeLists.txt +++ b/src/ucl/CMakeLists.txt @@ -1,13 +1,13 @@ SET(UCLSRC src/ucl_util.c src/ucl_parser.c src/ucl_emitter.c - src/ucl_hash.c - src/xxhash.c) + src/ucl_hash.c) ADD_LIBRARY(rspamd-ucl ${LINK_TYPE} ${UCLSRC}) SET_TARGET_PROPERTIES(rspamd-ucl PROPERTIES VERSION ${RSPAMD_VERSION}) SET_TARGET_PROPERTIES(rspamd-ucl PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB") +TARGET_LINK_LIBRARIES(rspamd-ucl xxhash) IF(HAVE_FETCH_H) TARGET_LINK_LIBRARIES(rspamd-ucl fetch) ELSE(HAVE_FETCH_H) -- 2.39.5