summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--contrib/xxhash/CMakeLists.txt3
-rw-r--r--contrib/xxhash/xxhash.c (renamed from src/ucl/src/xxhash.c)0
-rw-r--r--contrib/xxhash/xxhash.h (renamed from src/ucl/src/xxhash.h)0
-rw-r--r--debian/copyright2
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/ucl/CMakeLists.txt4
7 files changed, 12 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fcce10f1..42ca9f4b3 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 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
index 5869503be..5869503be 100644
--- a/src/ucl/src/xxhash.c
+++ b/contrib/xxhash/xxhash.c
diff --git a/src/ucl/src/xxhash.h b/contrib/xxhash/xxhash.h
index b9f528828..b9f528828 100644
--- a/src/ucl/src/xxhash.h
+++ b/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/CMakeLists.txt b/src/CMakeLists.txt
index 220825336..358b130b0 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 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)