From: Vsevolod Stakhov Date: Tue, 18 Feb 2014 18:14:53 +0000 (+0000) Subject: Move xxhash to contrib. X-Git-Tag: 0.7.0~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29962c678ab36050ffce1b2849d49eaa54aef921;p=thirdparty%2Frspamd.git Move xxhash to contrib. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fcce10f16..42ca9f4b35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -851,7 +851,8 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/ucl/include" "${CMAKE_SOURCE_DIR}/contrib/uthash" "${CMAKE_SOURCE_DIR}/contrib/http-parser" - "${CMAKE_SOURCE_DIR}/contrib/libottery") + "${CMAKE_SOURCE_DIR}/contrib/libottery" + "${CMAKE_SOURCE_DIR}/contrib/xxhash") SET(RSPAMDSRC src/modules.c src/controller.c @@ -887,13 +888,13 @@ IF(NOT HIREDIS_FOUND) INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/contrib/hiredis") ENDIF(NOT HIREDIS_FOUND) - +ADD_SUBDIRECTORY(contrib/xxhash) +ADD_SUBDIRECTORY(contrib/http-parser) +ADD_SUBDIRECTORY(contrib/libottery) ADD_SUBDIRECTORY(src/lua) ADD_SUBDIRECTORY(src/json) ADD_SUBDIRECTORY(src/cdb) ADD_SUBDIRECTORY(src/ucl) -ADD_SUBDIRECTORY(contrib/http-parser) -ADD_SUBDIRECTORY(contrib/libottery) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(src/client) diff --git a/contrib/xxhash/CMakeLists.txt b/contrib/xxhash/CMakeLists.txt new file mode 100644 index 0000000000..2cc0234d86 --- /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 2444ed3f14..c7c185af19 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/CMakeLists.txt b/src/CMakeLists.txt index 220825336a..358b130b08 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,6 +70,7 @@ TARGET_LINK_LIBRARIES(rspamd-util rspamd-ucl) TARGET_LINK_LIBRARIES(rspamd-util rspamd-ottery) TARGET_LINK_LIBRARIES(rspamd-util rspamd-http-parser) TARGET_LINK_LIBRARIES(rspamd-util event) +TARGET_LINK_LIBRARIES(rspamd-util xxhash) IF(NOT DEBIAN_BUILD) SET_TARGET_PROPERTIES(rspamd-util PROPERTIES VERSION ${RSPAMD_VERSION}) diff --git a/src/ucl/CMakeLists.txt b/src/ucl/CMakeLists.txt index cbceff4db7..e1df6890e0 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)